From 8fe8da6f4c787e26e180721a98b14758a175adee Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Fri, 2 Oct 2020 18:41:08 -0400 Subject: [PATCH 1/2] Add verified status to api.DealInfo --- api/api_full.go | 1 + node/impl/client/client.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/api/api_full.go b/api/api_full.go index ceb0518b8..5cbdde8e3 100644 --- a/api/api_full.go +++ b/api/api_full.go @@ -530,6 +530,7 @@ type DealInfo struct { DealID abi.DealID CreationTime time.Time + Verified bool } type MsgLookup struct { diff --git a/node/impl/client/client.go b/node/impl/client/client.go index 39f0ab19a..5997fc286 100644 --- a/node/impl/client/client.go +++ b/node/impl/client/client.go @@ -200,6 +200,7 @@ func (a *API) ClientListDeals(ctx context.Context) ([]api.DealInfo, error) { Duration: uint64(v.Proposal.Duration()), DealID: v.DealID, CreationTime: v.CreationTime.Time(), + Verified: v.Proposal.VerifiedDeal, } } @@ -223,6 +224,7 @@ func (a *API) ClientGetDealInfo(ctx context.Context, d cid.Cid) (*api.DealInfo, Duration: uint64(v.Proposal.Duration()), DealID: v.DealID, CreationTime: v.CreationTime.Time(), + Verified: v.Proposal.VerifiedDeal, }, nil } @@ -848,6 +850,7 @@ func newDealInfo(v storagemarket.ClientDeal) api.DealInfo { Duration: uint64(v.Proposal.Duration()), DealID: v.DealID, CreationTime: v.CreationTime.Time(), + Verified: v.Proposal.VerifiedDeal, } } From 306dfaa11f7e687c3cc001ce86cefaf9766166f1 Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Sat, 3 Oct 2020 03:41:01 -0400 Subject: [PATCH 2/2] Update docs --- documentation/en/api-methods.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/documentation/en/api-methods.md b/documentation/en/api-methods.md index a80f0b3e5..d03bb94ed 100644 --- a/documentation/en/api-methods.md +++ b/documentation/en/api-methods.md @@ -956,7 +956,8 @@ Response: "PricePerEpoch": "0", "Duration": 42, "DealID": 5432, - "CreationTime": "0001-01-01T00:00:00Z" + "CreationTime": "0001-01-01T00:00:00Z", + "Verified": true } ``` @@ -992,7 +993,8 @@ Response: "PricePerEpoch": "0", "Duration": 42, "DealID": 5432, - "CreationTime": "0001-01-01T00:00:00Z" + "CreationTime": "0001-01-01T00:00:00Z", + "Verified": true } ```