From 82fb81a33d60e1664462b10e7d1c23e1e677613c Mon Sep 17 00:00:00 2001 From: Anton Evangelatov Date: Mon, 29 Mar 2021 19:09:38 +0300 Subject: [PATCH] short circuit deals with no stages --- cli/deal/inspect.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cli/deal/inspect.go b/cli/deal/inspect.go index 839d16d0b..bc792b68f 100644 --- a/cli/deal/inspect.go +++ b/cli/deal/inspect.go @@ -55,6 +55,11 @@ func renderDeal(di lapi.DealInfo) { color.Blue("Deal ID: %d\n", int(di.DealID)) color.Blue("Proposal CID: %s\n\n", di.ProposalCid.String()) + if di.DealStages == nil { + color.Yellow("Deal was made with an older version of Lotus and Lotus did not collect detailed information about its stages") + return + } + for _, stg := range di.DealStages.Stages { msg := fmt.Sprintf("%s %s: %s (%s)", color.BlueString("Stage:"), color.BlueString(strings.TrimPrefix(stg.Name, "StorageDeal")), stg.Description, color.GreenString(stg.ExpectedDuration)) if stg.UpdatedTime.Time().IsZero() {