fix: Handle transactions after NAJ update to v4.0.x for WalletConnect #1205
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
After the update of wallet selector to use NAJ
v4.0.x
the wallet-connectsignAndSendTransaction(s)
has stopped working because the type of the value oftx.encode()
has changed fromBuffer
toUint8Array
since NAJ v3 the[email protected]
update.WalletConnect uses formats and encodes the payload and this handles the
Buffer
andUint8Array
differently.This PR adds support to handle the result returned from a wallet that uses latest version of NAJ (Uint8Array) and still keeps support for the old versions (Buffer).
I have also updated the web-examples of WalletConnect to add support for the latest version(s) of NAJ:
reown-com/web-examples#702
Checklist:
Type of change.