fix: ux: client deal addrs is on-chain check

Checks if the address used in `lotus client deal` is "initialized" on-chain before running the `uiLoop`. Resolves #8817
This commit is contained in:
Phi 2022-06-09 16:20:51 +02:00
parent 16d6e0eeb5
commit faa3b185bf

View File

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