Skip to content

Commit

Permalink
fix: ux: client deal addrs is on-chain check
Browse files Browse the repository at this point in the history
Checks if the address used in `lotus client deal` is "initialized" on-chain before running the `uiLoop`. Resolves #8817
  • Loading branch information
rjan90 committed Jun 9, 2022
1 parent 16d6e0e commit faa3b18
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cli/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,10 @@ func interactiveDeal(cctx *cli.Context) error {
a = def
}

if _, err := api.StateGetActor(ctx, a, types.EmptyTSK); err != nil {
return xerrors.Errorf("address not initialized on chain: %w", err)
}

fromBal, err := api.WalletBalance(ctx, a)
if err != nil {
return xerrors.Errorf("checking from address balance: %w", err)
Expand Down

0 comments on commit faa3b18

Please sign in to comment.