Skip to content

UnhandledPromiseRejectionWarning during minimum amount swap #54

Description

@PanderMusubi

Describe the bug
When making a minimal amount swap, the wallet doesn't go to the Payment step and the spinner is displayed endlessly or the rate info disappears before trying to go to the Payment step.

To Reproduce
Steps to reproduce the behavior:
Make swap from BDX to SOL and choose the miminum amount to send

Expected behaviour
What is the expected behaviour if the steps above are followed:
That the swap goes to the next step and works or same info is displayed and the user can go back to the first step.

Current Behaviour
What is the current behaviour if the steps to reproduce are followed:
Wallet hangs in infinite loop or displays unusable rate.

Probably the minimum amount to send that is also influence by live rate changes doesn't work well with transaction fee and causes the exception, but not sure about that.

The command line displays:

(node:30309) UnhandledPromiseRejectionWarning: TypeError: Cannot read properties of undefined (reading 'id')
    at e.<anonymous> (/opt/Beldex Electron Wallet/resources/app.asar/electron-main.js:2:60044)
    at p (/opt/Beldex Electron Wallet/resources/app.asar/electron-main.js:2:1689)
    at Generator.<anonymous> (/opt/Beldex Electron Wallet/resources/app.asar/electron-main.js:2:3035)
    at Generator.next (/opt/Beldex Electron Wallet/resources/app.asar/electron-main.js:2:2118)
    at n (/opt/Beldex Electron Wallet/resources/app.asar/electron-main.js:2:7689)
    at s (/opt/Beldex Electron Wallet/resources/app.asar/electron-main.js:2:7892)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
(node:30309) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

Using --unhandled-rejections=strict on the CLI doesn't make a difference.

Screenshots or Logs
If applicable, add screenshots or logs to help explain your problem.

This is when the wallet hangs

Image

This is when rate change results in unusable rates

Image

Additional Information (please complete the following information):

  • Operating System: Ubuntu 22.04 LTS
  • Version of Beldex 6.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions