Skip to content

[Bug]: Gas - Race condition where gas is not updated after switching assets and going to the last Confirmation screen #25243

@seaona

Description

@seaona

Describe the bug

Whenever we are sending an asset (ERC20, ERC721..) and we are on the Send Asset page, if we change the asset for another one (ie ETH) and proceed to the last Confirmation screen, the gasLimit is not updated no matter how long we wait.

This can cause troubles to users which are under slow network conditions.
Note: the hex data value is indeed updated immediately when we change assets, which is expected.

Expected behavior

If we don't want to block the Continue button before loading the new gas value, we should make sure that the gasLimit is set accordingly to the last transaction values (recipient, hex data and value) on the last confirmation screen.
At the moment this doesn't happen, as it seems that the gasLimit is only updated in the Send Assets screen (where these values can be changed).

Screenshots/Recordings

gaslimit-asset-old.mp4

Steps to reproduce

You can run the assets test to reproduce it (once the test it's fixed, you can go to an older commit)

#25181

Alternatively, you can simulate this by adding some delays in the code or slowing down your network

Error messages or log output

No response

Version

11.16.8 but seems earlier too

Build type

None

Browser

Chrome

Operating system

Linux

Hardware wallet

No response

Additional context

No response

Severity

No response

Metadata

Metadata

Assignees

Labels

Sev2-normalNormal severity; minor loss of service or inconvenience.staleissues and PRs marked as staleteam-bridge-deprecatedDEPRECATED: please use "team-swaps-and-bridge" insteadtype-bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions