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

Cannot read properly "toLowerCase of null" error is shown after swap transaction confirmation #21406

Closed
VolodLytvynenko opened this issue Oct 9, 2024 · 3 comments · Fixed by #21435
Assignees
Labels
wallet: swap wallet-core Issues for mobile wallet team
Milestone

Comments

@VolodLytvynenko
Copy link
Contributor

Steps:

  1. Go to swap
  2. Confirm swap transaction

Actual result:

"toLowerCase of null" error is shown after swap transaction confirmation

Image

Expected result:

The swap transaction is confirmed without error

Devices:

  • Pixel 7a, Android 13
  • iPhone 11 Pro Max, IOS 17

Logs

logs (2).zip

@briansztamfater
Copy link
Contributor

Sorry, seems I introduced this bug on #21395. I can point you into the problem so you can fix it @clauxx

@briansztamfater
Copy link
Contributor

briansztamfater commented Oct 9, 2024

The issue is triggered here

asset-to-pay (rf/sub [:wallet/token-by-symbol pay-token-symbol])
when swap data is cleared and the sub is recalculated. We should add some checks on the sub and view or provide a default value.

@churik churik removed this from Pipeline for QA Oct 10, 2024
@ilmotta ilmotta removed the bug label Oct 14, 2024
@clauxx
Copy link
Member

clauxx commented Oct 15, 2024

The issue is triggered here

status-mobile/src/status_im/contexts/wallet/swap/setup_swap/view.cljs

Line 101 in 5c44cb6
asset-to-pay (rf/sub [:wallet/token-by-symbol pay-token-symbol])
when swap data is cleared and the sub is recalculated. We should add some checks on the sub and view or provide a default value.

Is the issue is that the data is cleared before the screen is unmounted? I think would be better to make sure that the clearing happens later on, maybe by delaying the clearing. Or just having the clearing be dispatched when the swap screens are unmounted, which would be the best way to cleanup IMO. @briansztamfater wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wallet: swap wallet-core Issues for mobile wallet team
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants