Merge pull request #2873 from filecoin-project/fix/paych-cli-get

Fix CLI cmd: paych get
This commit is contained in:
Łukasz Magiera 2020-08-06 21:50:15 +02:00 committed by GitHub
commit aa4bd66f11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,12 +58,20 @@ var paychGetCmd = &cli.Command{
ctx := ReqContext(cctx) ctx := ReqContext(cctx)
// Send a message to chain to create channel / add funds to existing
// channel
info, err := api.PaychGet(ctx, from, to, types.BigInt(amt)) info, err := api.PaychGet(ctx, from, to, types.BigInt(amt))
if err != nil { if err != nil {
return err return err
} }
fmt.Println(info.Channel.String()) // Wait for the message to be confirmed
chAddr, err := api.PaychGetWaitReady(ctx, info.ChannelMessage)
if err != nil {
return err
}
fmt.Println(chAddr)
return nil return nil
}, },
} }