-
Notifications
You must be signed in to change notification settings - Fork 158
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
Add support for NearMobileWallet #931
Conversation
Hi @GuillemGarciaDev , I try to run this PR, and I can see wallet in list, but when I try to open it, I can't see QR code there. |
Hi @GuillemGarciaDev , While trying to login with near mobile wallet we noticed a QR code shown in the modal. |
Hi @erditkurteshiSQA! When the version is uploaded I will notify you so you can test it. Thanks for your quick reply! |
Hi @HarisSQA ! When you click on the wallet, does a modal appear or nothing at all? Thanks for the feedback! |
Hi @GuillemGarciaDev , I had an issue only with the QR code. Modal was working fine. Also, I have tested it now, and the QR code is shown in modal. |
Hello! Sorry for taking so long to reply. @HarisSQA we are trying to replicate your case! Thanks for the feedback. Possibly tomorrow or the day after you will have the new version of the app available to test the wallet connector with the wallet. @HarisSQA @erditkurteshiSQA When it's up I'll notify you! Thanks again! |
Hi! @HarisSQA @erditkurteshiSQA The new version of NEAR Mobile wallet has been uploaded to the stores, so you can now test the PR properly. Once you import an account, you will find a scan button on the bottom bar of the app that will allow you to scan QRs. I'll keep an eye out for any feedback. |
Hi @GuillemGarciaDev , We have tested the wallet with the latest release of the app. Take a look at the picture below: |
The issue is now fixed! It was a missing env variable. I tested the guest-book locally with the app and it seems to be working fine. All requested PR changes have been fixed! Regards, Guillem |
Hi @GuillemGarciaDev , We were able to log in with iOS and tested it. However, the Also, we noticed that if we close the QR modal while trying to connect with the wallet, we still see the message On Android, however, on the Play Store, it's still the older version of the wallet, and the login problem still persists. Play Store app version: 1.3.0 |
], | ||
}, | ||
moduleFileExtensions: ["ts", "tsx", "js", "jsx"], | ||
coverageDirectory: "../../coverage/packages/ramper-wallet", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please update the coverageDirectory to the near-mobile-wallet?
Hi @HarisSQA ! We have been working on the Android issue and it is already solved. You will be able to test it when it is in Play store. 👍🏻 On the other hand, could you provide me some info about how the signed message is verified? What we do is to verify the signature using the public key of the account. const { publicKey, signature, accountId } = response;
const sign = new Uint8Array(Buffer.from(signature, "base64"));
const messageHash = new Uint8Array(sha256.digest(`NEP0413:${JSON.stringify({ receiver, message })}`));
const isValidSignature = PublicKey.fromString(publicKey).verify(messageHash, sign); Thank you for your feedback! |
Hi @GuillemGarciaDev , Please refer to the example referenced here in the NEP: This is how the message needs to be serialized and signed in the wallet: This is how we verify on our examples: Looks like you have implemented some kind of an old version of the sign message looking at this line of code: The NEP413 does not add a prefix string NEP0413 to the message now it uses a tag (number) there's no receiver either please see the interface: Message must be signed with the above structure with params ordered alphabetically for the required params. |
There's a new version in the Play Store to try out wallet selector in Android! There's a new update on the |
Hi @GuillemGarciaDev , We checked the latest iOS and android version and the functionalities are working including
As a suggestion consider comparing the UX of wallet-selector with |
Hi @erditkurteshiSQA and @HarisSQA it's Adrià from Peersyst team, thanks for all this feedback. We have almost all the points that you mentioned done, except the 4th one. Is it something that you require to be done before getting approved or we can merge without this point and make an improvement later on? Also could you point us to some links or docs that better explain the local signing? Thank you! |
Hey @AdriaCarrera The 4th point is being mentioned as an improvement and can be done later on once the other points are working fine. The idea is to be able to sign FunctionCall transactions that don't have any deposit without confirming it on the Wallet since the FunctionCall Access-key (limited access key LAK) is on the localStorage of when we sign in with NearMobileWallet, this improves the UX. Looks like you save the LAK in For instance, one use case of such a transaction is the ability to send messages in our guest book example without needing confirmation in the wallet when no deposit is attached. This approach is also implemented in In our wallet-connect package, we have a simpler version, as shown in here: The exact implementation might differ but the core idea is the same, I believe a similar approach can be implemented in the @peersyst/near-mobile-signer package. If you need any more information or have more questions, feel free to reach out. Thank you! |
Hi @GuillemGarciaDev @AdriaCarrera , Following the recent update on the Near mobile wallet and this PR, we tested it on both iOS and Android. Additionally, kindly remember that the 4th point, mentioned earlier, is considered an improvement and can be addressed once the other points are resolved. Thank you! |
Hi @erditkurteshiSQA !! This issue seems already fixed and you have available a new version with all the improvements (except the 4th one). I hope you find this fixes working as expected! Thank you again!! |
After testing the wallet with the latest version in both platform, all issues have been successfully resolved. We are now ready to merge this PR. Thank you! |
Hi, @GuillemGarciaDev & @AdriaCarrera we have published a new version of the wallet-selector: Release notes: https://github.com/near/wallet-selector/releases/tag/v8.7.0 Near Mobile Wallet: https://www.npmjs.com/package/@near-wallet-selector/near-mobile-wallet |
Hi, @GuillemGarciaDev & @AdriaCarrera could you please take a look at the issues that need improvement:
qr-code-issue-near-mobile-wallet.webm |
Hi! @kujtimprenkuSQA we are working to fix these issues. About Should we create a new PR with the new fixes? Thank you for your feedback! |
Yes, a new PR should be made once the QR Code issue is fixed and also the dependencies for |
Description
Please include a summary of the wallet and how users can install it. Be sure to take a look at our guide on Custom Wallets to understand core concepts when integrating with Wallet Selector.
Summary
In order to onboard customers with our wallet, this PR intends to connect NearMobileWallet with Wallet Selector. Users of the Near Mobile wallet may safely store, manage, and send NEAR and other cryptocurrencies while on the go. Non-custodial mobile wallet that is simple to use.
PR summary
This PR contains the integration with Wallet selector. To achieve it, a package has been added to
package.json
file (@peersyst/near-mobile-signer
) to handle the requests.Checklist: