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

Handle the case when nonce is a base64 string for signMessage #194

Conversation

kujtimprenkuSQA
Copy link
Contributor

Issues

Original issue:

Currently the nonce is being passed as a string of ASCII characters characters from wallet-selector in case the nonce Buffer contains any value greater than 128 it adds these symbols to the URL which results in strange behavior such as errors either like:
Array length 60 does not match schema length 32 at value.nonce

OR

image

Changes description

This PR adds the possibility to handle the case when the nonce is passed to the URL as a base64 string which is more URL-safe but still keeps the old functionality to avoid breaking changes for the current and older versions of the wallet-selector

Changes made to wallet-selector to fix the issue: near/wallet-selector#1067

Preview

Demo

Copy link

netlify bot commented Feb 1, 2024

Deploy Preview for imaginative-sunflower-a54795 ready!

Name Link
🔨 Latest commit 14f12b0
🔍 Latest deploy log https://app.netlify.com/sites/imaginative-sunflower-a54795/deploys/65bbdd219a34640008426db4
😎 Deploy Preview https://deploy-preview-194--imaginative-sunflower-a54795.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@edwardchew97
Copy link
Contributor

Thanks for submitting the PR, appreciate the work!
Looks clean and straight forward to me. Is there any testnet app where we can test out the this update?

@kujtimprenkuSQA
Copy link
Contributor Author

Thanks for submitting the PR, appreciate the work! Looks clean and straight forward to me. Is there any testnet app where we can test out the this update?

Hi, I just manually deployed the changes of this PR: near/wallet-selector#1067 in gh-pages: https://near.github.io/wallet-selector

The walletUrl for MNW is set to the preview URL: https://deploy-preview-194--imaginative-sunflower-a54795.netlify.app/

Copy link
Contributor

@edwardchew97 edwardchew97 left a comment

Choose a reason for hiding this comment

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

Looks good, appreciate the contribution!

@edwardchew97 edwardchew97 merged commit dcf6bcc into mynearwallet:master Feb 3, 2024
6 checks passed
@kujtimprenkuSQA
Copy link
Contributor Author

Looks good, appreciate the contribution!

@edwardchew97 thank you for merging it.

Is there any estimated time on when it can be live on mainnet and testnet?

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