keplr-wallet
keplr-wallet copied to clipboard
Allow 0 Fee Transactions
Describe the bug Keplr doesn't allow signatures of transactions for 0 denom currency. This is useful for development purposes,
To Reproduce Steps to reproduce the behavior:
- Initiate an account with 0 funds
- Trigger a 0 fee transaction
- Sign it and Keplr won't approve it due to insufficient balances
Expected behavior If it is freee, it should not show insufficient balances.
Screenshots
Device details (please complete the following information):
- Brave, Ubuntu, 0.12.69 Keplr (what Brave says), Browser Wallet (i.e not hardware)
@trevormil It would be nice to know what chain it is and the chain information.
@HeesungB Hello, it was just a local development chain. That is why I didn't add the information.
The 0 fee transactions are super useful for development.
@trevormil Zero fees are possible. I think it depends on how you include the chain information when you register Keplr in your development chain.
@HeesungB In this specific screenshot, the account has 8400 BOOT which is >0 BOOT, so it is allowed because it has sufficient balances. My issue was when the account has 0 BOOT and executing a transaction with 0 BOOT fee. It could still be in the experimental chain settings, but wanted to make that clear.
To be fair, it is a pretty unique case. Normally, to register the account on-chain, you'd send them BOOT (or the gas token). But, this situation could arise, for example, if you are registered, waste all your tokens down to 0, and are executing a new transaction. Or, if you register the account in another way (e.g. calling account keep setAccount w/o sending them funds first).
My issue was not with whether 0 fee transactions are allowed or not. It was that they are non-executable via Keplr UI when the account has 0 funds.
@trevormil Understood.
Can you test it with the link option below?
https://github.com/chainapsis/keplr-wallet/blob/8d79f9aa5a77fc822cdcab75b8992376f7af1d1a/packages/types/src/wallet/keplr.ts#L51
@HeesungB Yes, that works. Thanks.
However, I do think that the default functionality should allow it. Insufficient balances is supposed to mean balance < fee, not balance <= fee. Just a suggestion, up to you whether you want to implement it or not. Without it, Keplr UI is blocking a valid transaction that would succeed on-chain.
@trevormil Yes, I'll talk to the maintainer of this repository.