Skip to content

Commit a207014

Browse files
committed
Fix balance command to print API errors in text mode
The balance command was silently dropping errors from the API response in text mode. Both balances and stablecoins commands call printBalanceErrors, but balance was missing this call despite unmarshaling the same response structure with the Errors field.
1 parent bcff9e1 commit a207014

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cmd/sim/evm/balance.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ func runBalance(cmd *cobra.Command, args []string) error {
7373
return fmt.Errorf("parsing response: %w", err)
7474
}
7575

76+
printBalanceErrors(cmd, resp.Errors)
77+
7678
if len(resp.Balances) == 0 {
7779
fmt.Fprintln(w, "No balance found.")
7880
return nil

0 commit comments

Comments
 (0)