From 0d7afef0c59a20101792020b4f2404d70cb7cd74 Mon Sep 17 00:00:00 2001 From: hannahhoward Date: Fri, 28 Feb 2020 18:10:11 -0800 Subject: [PATCH] fix(paychmgr): add to paych serialziation --- node/impl/client/client.go | 6 +++--- paychmgr/simple.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/node/impl/client/client.go b/node/impl/client/client.go index d2555968a..cd4483594 100644 --- a/node/impl/client/client.go +++ b/node/impl/client/client.go @@ -308,10 +308,10 @@ func (a *API) ClientRetrieve(ctx context.Context, order api.RetrievalOrder, path unsubscribe := a.Retrieval.SubscribeToEvents(func(event retrievalmarket.ClientEvent, state retrievalmarket.ClientDealState) { if state.PayloadCID.Equals(order.Root) { - switch event { - case retrievalmarket.ClientEventError: + switch state.Status { + case retrievalmarket.DealStatusFailed, retrievalmarket.DealStatusErrored: retrievalResult <- xerrors.Errorf("Retrieval Error: %s", state.Message) - case retrievalmarket.ClientEventComplete: + case retrievalmarket.DealStatusCompleted: retrievalResult <- nil } } diff --git a/paychmgr/simple.go b/paychmgr/simple.go index 1370865ed..d49bdd550 100644 --- a/paychmgr/simple.go +++ b/paychmgr/simple.go @@ -17,7 +17,7 @@ import ( ) func (pm *Manager) createPaych(ctx context.Context, from, to address.Address, amt types.BigInt) (address.Address, cid.Cid, error) { - params, aerr := actors.SerializeParams(&paych.ConstructorParams{To: to}) + params, aerr := actors.SerializeParams(&paych.ConstructorParams{From: from, To: to}) if aerr != nil { return address.Undef, cid.Undef, aerr }