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

Detect Adjust WalletConnected Safes #134

Merged
merged 4 commits into from
Nov 20, 2020
Merged

Detect Adjust WalletConnected Safes #134

merged 4 commits into from
Nov 20, 2020

Conversation

cag
Copy link
Contributor

@cag cag commented Nov 19, 2020

Related #127

@cag cag changed the title Detect the Safe Detect Adjust WalletConnected Safes Nov 19, 2020
@cag cag changed the base branch from master to development November 19, 2020 19:37

const peerName = wc?.peerMeta?.name

if (peerName === 'Safe Multisig WalletConnect' || peerName?.startsWith?.('Gnosis Safe')) {
Copy link
Member

Choose a reason for hiding this comment

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

Should we change this to startsWith('Safe') ... just to be on the safe side (no pun intended)

Copy link
Member

Choose a reason for hiding this comment

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

Btw the multisig identifies itself as Gnosis Safe Multisig so the current logic should work.

see https://github.com/gnosis/safe-react-apps/pull/78/files#diff-791a7865e89890c3f6524eff6f43a645c54438fec18d7064aaff481efa0b9debL27

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yeah, maybe, though German just merged it with the stricter check, so I guess that's going to stay for now 😅

@germartinez
Copy link
Member

Do you know any open sourced Dapp that I can use to test this (updating its CPK version with this branch locally)?
I've been trying to make it work in the CPK Config Dapp updating the CPK version with this branch with no success.
I've tried web3 and ethers providers and web3modal and web3Connect but I'm getting:

TypeError: this.signer.provider.send is not a function when using ethers
TypeError: this.send is not a function when using web3

@germartinez
Copy link
Member

Forget about my previous comment.

Web3Modal has an issue when using web3 1.3.0 (thanks Richard!)
https://ethereum.stackexchange.com/questions/87872/issue-about-connecting-with-walletconnect-by-using-the-example-of-web3modal

I downgraded the version in the CPK Dapp to test it and this PR works

@germartinez germartinez merged commit e52b8b4 into development Nov 20, 2020
@germartinez germartinez deleted the detect-safe branch November 20, 2020 18:36
@germartinez germartinez mentioned this pull request Feb 22, 2021
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.

3 participants