Closed andy-verida closed 2 years ago
Hey, @andy-verida thank you for raising this issue.
I have tried earlier to signIn, signOut, signAndSendTransaction with Wallet Connect and it worked for me this is what I did:
You can either use the published version of Wallet Selector: https://near.github.io/wallet-selector/
Or in locally switch to main
branch run git pull
remove dist
and node_modules
and then run this command to make a fresh build for all packages:
yarn && yarn build:modal-ui && yarn build:all && yarn nx serve react
Earlier I updated the WalletConnect dependencies in the Web Examples you can find the Wallet Example here:
https://github.com/kujtimprenkuSQA/web-examples/
And checkout to this branch SQC-170/bridge-wallet-poc-update-deps
Then go to /wallets/react-wallet-v2
Run this: cp .env.local.example .env.local
Update your WalletConnect projectID in .env.local
In the end run:
yarn && yarn dev
UPDATE:
After some more investigation, the issue seems to be the mismatch of near-api-js
version between the dApp and WalletSelector or even the Wallet itself.
To avoid running into this issue we will need to set near-api-js
as a peer dependency for the wallet-connect
package too, there's already a PR https://github.com/near/wallet-selector/pull/455 in progress about this and as soon as it's merged we can prepare a patch release for this bug.
In the meantime just to let you know we usenear-api-js
version v^0.44.2
in the wallet selector use this version in your projects until we make the release, we will let you know when we do.
@kujtimprenkuSQA thanks for your help, and sorry for my late reply.
the issue seems related to one of WalletConnect npm dependencies, I still haven't tracked it down.
Today I tried the latest version of WalletConnect 2.0.0-rc.3 and can now sign a donation transaction. https://github.com/WalletConnect/walletconnect-monorepo/releases/tag/2.0.0-rc.3
One remaining issue is the multiple transaction options, It doesn't work and just shows an error on the NEAR Guest book app. Could you please try it sometime?
Thank you for mentioning the issue for sending multiple transactions with WalletConnect, we have noticed it too and fixed it, I believe very soon we will have a release with these fixes.
The issue has been fixed here: https://github.com/near/wallet-selector/pull/463
Super! Thanks @kujtimprenkuSQA.
Hey, @andy-verida we have published a new versionv7.0.3
:
https://www.npmjs.com/org/near-wallet-selector
Release Notes:
https://github.com/near/wallet-selector/releases/tag/v7.0.3
Hey, @kujtimprenkuSQA that's great! thanks for letting me know.
Hi, I saw after 7.0.x, WC_METHODS
changed into only get signedTransaction from wallet client, rather than sign and send transaction on wallet client.
But I didn't figure out how to sign a transaction with a given public key, KeyPair
class in near-api-js
didn't support sign with a given public key, so I got an error like this when tx broadcasting:
Transaction is not signed with the given public key
@kujtimprenkuSQA Now you can use our mobile wallet test WalletConnect 2.0 https://xoth.app/
Describe the bug Unable to sign transaction after a recent update from wallet-selector, more specifically that the changes of PR https://github.com/near/wallet-selector/pull/441
Some changes I made to adapt to the new version of wallet-selector
And:
To Reproduce Steps to reproduce the behavior:
More on debugging:
Expected behavior Expect success sign message with a donation
Screenshots Here's a record of the issue run locally with sourcemap: https://www.loom.com/share/577e67abb88a44888fe3f8191b8fb03f
Device (please complete the following information):
Additional context An old issue https://github.com/near/wallet-selector/issues/373 that I got instructions and made it's working, but now it's broken.