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

feat: add wallet connect support #273

Closed
wants to merge 7 commits into from
Closed

feat: add wallet connect support #273

wants to merge 7 commits into from

Conversation

seaona
Copy link
Contributor

@seaona seaona commented Nov 7, 2023

Context

Needed for testing the PPOM module in Mobile + Wallet Connect

What

Adds wallet connect support to the test dapp.

How

  • A button triggers the Wallet Connect Modal. Using the Wallet Connect option, you can scan the QR code using your phone based MetaMask Wallet, to start getting transaction/signatures requests triggered from the test dapp on your phone wallet.
  • Whenever the WalletConnect connection is established, a new provider is added. You can then choose to use MetaMask or WalletConnect providers alternatively to trigger your Extension or your Mobile wallet
  • For Wallet Connect, we only have a subset of functionalities enabled for now: Sends/Signatures but excluding Contract Deployments, as needs some more investigation on how to get the contract address. This can be extended in the future (not currently needed for the purposes of PPOM).

Future Work

  • Refactor button list and in general the index.js file, as it starts to grow big. We could better organize the different dapp functionalities in the future
  • Add Deploy Smart Contract functionality for Wallet Connect
  • Add SDK support in the same way -- this will enable to test PPOM with SDK

Screenshots

wc-test-dapp.mp4

Screenshot from 2023-12-11 16-19-41

Copy link

socket-security bot commented Nov 7, 2023

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Issue Package Version Note Source
Deprecated @npmcli/move-file 2.0.1
  • Reason: This functionality has been moved to @npmcli/fs
Network access ioredis 5.3.2
Network access jayson 4.1.0
Network access ws 7.5.9
Network access @solana/web3.js 1.87.6
Network access @walletconnect/core 2.10.5
Network access @walletconnect/ethereum-provider 2.10.5
Network access @walletconnect/jsonrpc-http-connection 1.0.7
No README @walletconnect/jsonrpc-http-connection 1.0.7
Network access @web3modal/core 3.4.0
Network access cross-fetch 3.1.8
Network access make-fetch-happen 10.2.1
Network access minipass-fetch 2.1.2
Network access node-fetch 2.7.0
Network access node-fetch-native 1.4.1
Network access ofetch 1.3.3
Network access rxjs 6.6.7
Network access unenv 1.8.0
Network access unstorage 1.10.1
Network access JSONStream 1.3.5
Network access http-shutdown 1.2.2
Network access pino-std-serializers 4.0.0
Network access listhen 1.5.5
New author @solana/buffer-layout 4.0.1
New author react 18.2.0
New author react-dom 18.2.0
New author scheduler 0.23.0
New author use-sync-external-store 1.2.0
New author bs58 4.0.1
New author @walletconnect/environment 1.0.1
New author @walletconnect/events 1.0.1
No README @walletconnect/events 1.0.1
New author @walletconnect/relay-auth 1.0.4
New author @walletconnect/time 1.0.2
New author @walletconnect/window-getters 1.0.1
New author @walletconnect/window-metadata 1.0.1
New author eth-sig-util 2.5.4
New author @metamask/onboarding 1.0.1
New author unique-slug 3.0.0
New author sonic-boom 2.8.0
New author anymatch 3.1.3
New author are-we-there-yet 3.0.1
New author npmlog 6.0.2
New author rlp 2.2.7
New author node-addon-api 7.0.0
Shell access node-addon-api 7.0.0
New author @walletconnect/safe-json 1.0.2
New author @npmcli/fs 2.1.2
New author fast-diff 1.3.0
New author node-gyp 9.4.1
New author exponential-backoff 3.1.1
New author v8-compile-cache 2.4.0
No README @stablelib/aead 1.0.1
No README @stablelib/binary 1.0.1
No README @stablelib/bytes 1.0.1
No README @stablelib/chacha 1.0.1
No README @stablelib/chacha20poly1305 1.0.1
No README @stablelib/constant-time 1.0.1
No README @stablelib/ed25519 1.0.3

src/index.html Outdated Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved

// TODO: Need to align with @metamask/onboarding
const isMetaMaskInstalled = () => provider && provider.isMetaMask;

// test id
const projectId = 'e6360eaee594162688065f1c70c863b7';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

test id

@seaona seaona closed this Dec 12, 2023
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.

1 participant