fix(paychmgr): add to paych serialziation

This commit is contained in:
hannahhoward 2020-02-28 18:10:11 -08:00
parent fa245c1e53
commit 0d7afef0c5
2 changed files with 4 additions and 4 deletions

View File

@ -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
}
}

View File

@ -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
}