fix: make 'lotus paych get' block until funds available
This commit is contained in:
parent
e54a87f91b
commit
2de0c9cb1a
10
cli/paych.go
10
cli/paych.go
@ -58,12 +58,20 @@ var paychGetCmd = &cli.Command{
|
||||
|
||||
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))
|
||||
if err != nil {
|
||||
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
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user