Skip to content

Insufficient funds error should propagate to user #119

@barbaraliau

Description

@barbaraliau

Bug Description
If you don't have enough funds to pay for the transaction, the modal stays open and gives no indication that it failed. Dev tools console shows the following error:

Uncaught (in promise) Error: insufficient funds for intrinsic transaction cost (error={}, method="sendTransaction", transaction=undefined, code=INSUFFICIENT_FUNDS, version=providers/5.1.2)
    at e.value (index.ts:205)
    at e.value (index.ts:217)
    at A (json-rpc-provider.ts:49)
    at json-rpc-provider.ts:199

Steps to Reproduce

  1. Attempt to make a transaction with insufficient CELO

Expected Behavior
There should be some indication to the user of why this action failed. I initially just kept trying to do the transaction, reconnecting my Ledger, refreshing the page, etc. Related to #21 as implementing that feature would have prevented me from swapping too much CELO in the first place, though I still think it's important to propagate the error to the user in any case.

Additional Context
Context: On desktop using a Ledger
Version 1.23.71 Chromium: 90.0.4430.72 (Official Build) (x86_64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions