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

fix: decoding txs without parameters #1938

Merged
merged 1 commit into from
May 4, 2023
Merged

Conversation

schmanu
Copy link
Member

@schmanu schmanu commented May 4, 2023

What it solves

Transactions that call functions without parameters, for instance wrapping a native token.
Lead to uncaught errors in our DecodeTx component.

How this PR fixes it

Checks if the first parameter is undefined.

How to test it

Try to wrap xdai to wxdai on gnosis chain by doing a deposit() call (e.g. by using cowswap or tx builder)

Checklist

  • I've tested the branch on mobile 📱
  • I've documented how it affects the analytics (if at all) 📊
  • I've written a unit/e2e test for it (if applicable) 🧑‍💻

@schmanu schmanu requested a review from katspaugh May 4, 2023 08:48
@github-actions
Copy link

github-actions bot commented May 4, 2023

Branch preview

✅ Deploy successful!

https://fix_decoding_tx_without_params--webcore.review-web-core.5afe.dev

@github-actions
Copy link

github-actions bot commented May 4, 2023

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@@ -82,8 +82,6 @@ describe('DecodedTx', () => {
return Promise.resolve()
})

result.debug()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I left it there.

Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, nice catch!

@katspaugh katspaugh merged commit 3e59c5c into dev May 4, 2023
@katspaugh katspaugh deleted the fix-decoding-tx-without-params branch May 4, 2023 10:45
@github-actions github-actions bot locked and limited conversation to collaborators May 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants