Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Insufficient available balance for transaction fee" for multisig accounts #204

Closed
greg-szabo opened this issue Nov 28, 2021 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@greg-szabo
Copy link

Great extension! I use it regularly.

I am testing Keplr with legacy multisig transactions on the Cosmos Hub. When I try to submit a send transaction from a multisig address, Keplr keeps the "Approve" button grayed out. When I click "override fee", I get Insufficient available balance for transaction fee under the choices for fee. (This might or might not be multisig-related, I'm not sure.)

The account definitely has enough free ATOMS, so I'm not sure why Keplr is so adamant.

How to recreate the issue:

Here's a demo website that will trigger Keplr: https://cosmoshub-legacy-multisig.vercel.app/multi/cosmos16k579jk6yt2cwmqx9dz5xvq9fug2tekv6g34pl/transaction/316472223760122449

The website is an Interchain Foundation demo project. Source code is hosted here: https://github.com/samepant/cosmoshub-legacy-multisig

Alternatively, here is the actual transaction JSON:

{
  "chain_id": "cosmoshub-4",
  "account_number": "21021",
  "sequence": "62",
  "fee": {
    "gas": "200000",
    "amount": [
      {
        "amount": "6000",
        "denom": "uatom"
      }
    ]
  },
  "msgs": [
    {
      "type": "cosmos-sdk/MsgSend",
      "value": {
        "from_address": "cosmos16k579jk6yt2cwmqx9dz5xvq9fug2tekv6g34pl",
        "to_address": "cosmos1fghgwhgtxtcshj4a9alp7u2qv6n2wffqj4jdl9",
        "amount": [
          {
            "amount": "1000000",
            "denom": "uatom"
          }
        ]
      }
    }
  ],
  "memo": ""
}

You can check on the chain that the from_address has enough free tokens for the transaction.

Is it possible that Keplr checks the from_address and only allows signatures from that address? (Which would make multisig signatures impossible.)

@Thunnini
Copy link
Member

The reason this happens is that the sender is the current account selected, not from the msgs in the transaction. I will fix it soon.

@delivan delivan added the bug Something isn't working label Nov 30, 2021
Thunnini added a commit that referenced this issue Nov 30, 2021
@Thunnini
Copy link
Member

Thunnini commented Dec 3, 2021

@greg-szabo From v0.9.9, the balance is checked by considering the sender of msgs in tx. However, in the case of the fee part, it seems a bit difficult to measure which account will actually pay the fee. So, the fee part was not processed. If the multi-sig accounts have some balance of fee, it will pass. However, in the case of multi-sig, it is recommended to use the disableBalanceCheck option to turn off the balance check feature itself.

@Thunnini Thunnini closed this as completed Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants