Insuficcient Funds

Transacctions are being rejected for insufficient funds but there are plenty

:computer: Environment

Relayer + Defender

:memo:Details

Hi, i 've been trying to send transactions to mint some nfts to my defender but the issue is that they are being rejected due to insuficcient funds, i know that to calculate the pending transacctions you use something along this lines

let pendingTxCosts = 0

for tx in tx_queue_for_account
pendingTxCosts += (tx.gasLimit * tx.gasPrice)
end

return pendingCosts

But the issue is that i set a gasLimit very close to the actual cost of the transacction or just not set it but still it just gets rejected for insufficient funds. For example i had 16 matic, i send 20 transacctions that had an average cost of 0,4 per transaction. That would cost 8 matic in total but still i get this message that there are no sufficient funds.

It also makes little sense the message, like 8.136317961842 MATIC required but also that is the total cost of all pending transactions?

:1234: Code to reproduce

Error: Error while attempting request: Insufficient funds: 8.136317961842 MATIC required but 5.777590065830900081 MATIC are available for usage on the account(balance is currently 13.913908027672900081 MATIC and the expected cost of all pending transactions is 8.136317961842 MATIC)

1 Like

Hi @Lucas_Demarchi

We noticed that you asked this question also throw email, so I think it will be good that we continue the support via this forum post, so that way other users could benefit from the answer.

I will need your tenantId in order to do some research on what can be happening, this ID can be located once you click on the top right menu.

Sure thanks!
caa47fdd-0bd3-47f4-8e7e-c7093543679e