near/near-cli-rs

Weird available balance report

miraclx opened this issue ยท 1 comments

An account with insufficient balance for storage + ~tx costs seems to have its "available balance" wrapped around. Makes me think I have more money than I (or anyone) does ๐Ÿ˜„.

$ near tokens alt.miraclx.near view-near-balance network-config mainnet now

alt.miraclx.near account has 340282366920938.460863748557431768211456 NEAR available for transfer (the total balance is 0.00022037395 NEAR, but 0.00182 NEAR is locked for storage and the transfer transaction fee is ~0.001 NEAR)

Here is your console command if you need to script it or re-run:
near tokens alt.miraclx.near view-near-balance network-config mainnet now

Here's the relevant bit of code:

near-cli-rs/src/common.rs

Lines 147 to 149 in dd82e7b

self.account_liquid_balance
.saturating_sub(self.liquid_storage_stake())
.saturating_sub(self.pessimistic_transaction_fee)

Looks like that pulls into logic within https://github.com/near/near-token-rs

I think this issue was resolved within the latest update. Please, run near extensions self-update

image

Here's the output from the previous version of near-cli-rs:

image