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:
		
							parent
							
								
									16d6e0eeb5
								
							
						
					
					
						commit
						faa3b185bf
					
				| @ -559,6 +559,10 @@ func interactiveDeal(cctx *cli.Context) error { | |||||||
| 		a = def | 		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) | 	fromBal, err := api.WalletBalance(ctx, a) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return xerrors.Errorf("checking from address balance: %w", err) | 		return xerrors.Errorf("checking from address balance: %w", err) | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user