archway-network / cli

Develop WASM smart contracts with the Archway network developer CLI
https://docs.archway.io
Apache License 2.0
44 stars 21 forks source link

fix(accounts): Cannot query balance for valid bech32 address #230

Closed aelesbao closed 11 months ago

aelesbao commented 1 year ago

Description

Running the command archway accounts balance query archway1... fails with an account not found error.

The CLI should be able to query the balance for any valid bech32 address that works in the current chain (based on the chain registry properties).

Technical Details

The Account domain class has a method called queryBalance, which is misplaced and crosses the responsibility boundaries of this class. The logic to query the balance should reside exclusively in the AccountsBalancesGet command.