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: borked walletconnect v2 send transaction confirmation #4978

Merged
merged 2 commits into from
Jul 25, 2023

Conversation

gomesalexandre
Copy link
Contributor

@gomesalexandre gomesalexandre commented Jul 25, 2023

Description

Makes WalletConnect transaction confirmation modal happy again, though the actual broadcasting still seems to be broken, with no error nor failed (or successful) XHR

tl;dr is we were too strict/not accurate on what makes a transaction a transaction, and throwing at isTransactionParams time.

Pull Request Type

  • 🐛 Bug fix (Non-breaking Change: Fixes an issue)
  • 🛠️ Chore (Non-breaking Change: Doc updates, pkg upgrades, typos, etc..)
  • 💅 New Feature (Breaking/Non-breaking Change)

Issue (if applicable)

tackles #4976

Risk

Transaction detection and gas params may be broken, though WalletConnect to dApps seems to be entirely broken at the moment so can't make it more broken?

Testing

  • Connect to Uniswap through WalletConnect to dApps
  • Initiate a transaction
  • The confirm modal should be shown, vs. the app previously crashing

Engineering

  • ☝🏽
  • The broadcast not working may or may not be caused by local shenanigans - if you managed to actually broadcast the transaction, change the issue section to closes

Operations

  • ☝🏽

Screenshots (if applicable)

  • This diff
image
  • Prod

App crashes

Copy link
Contributor Author

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@gomesalexandre gomesalexandre marked this pull request as ready for review July 25, 2023 22:17
@gomesalexandre gomesalexandre requested a review from a team as a code owner July 25, 2023 22:17
nonce: transaction?.nonce ? convertHexToNumber(transaction.nonce).toString() : undefined,
gasLimit:
transaction?.gasLimit ?? transaction?.gas
? convertHexToNumber((transaction?.gasLimit ?? transaction?.gas)!).toString()
Copy link
Contributor

@0xApotheosis 0xApotheosis Jul 25, 2023

Choose a reason for hiding this comment

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

Are we guaranteed to have either a gas or a gasLimit?
If not we might want to fallback to 0 or something so we don't throw.

Copy link
Contributor

@0xApotheosis 0xApotheosis left a comment

Choose a reason for hiding this comment

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

One comment above on type safety, otherwise seems sane pending ops testing.

@0xApotheosis 0xApotheosis merged commit 3c0feb8 into develop Jul 25, 2023
3 checks passed
@0xApotheosis 0xApotheosis deleted the fix_borked_walletconnect_v2_things branch July 25, 2023 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants