Skip to content

Commit

Permalink
feat: revive wc2 live code example
Browse files Browse the repository at this point in the history
  • Loading branch information
hui-an-yang committed Sep 11, 2024
1 parent 5c2af23 commit 500967b
Show file tree
Hide file tree
Showing 9 changed files with 192 additions and 81 deletions.
2 changes: 2 additions & 0 deletions apps/taquito-test-dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
"@taquito/core": "^20.0.1",
"@taquito/taquito": "^20.0.1",
"@taquito/utils": "^20.0.1",
"@taquito/wallet-connect-2": "^20.0.1",
"buffer": "^6.0.3",
"svelte-modals": "^2.0.0-beta.2",
"svelte-select": "^5.8.3",
"vite-compatible-readable-stream": "^3.6.1"
},
Expand Down
10 changes: 5 additions & 5 deletions docs/wallet_connect_2.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ await walletConnect.requestPermissions({
PermissionScopeMethods.OPERATION_REQUEST, PermissionScopeMethods.SIGN
],
},
registryUrl: "https://www.tezos.help/wcdata/"
// registryUrl: "https://www.tezos.help/wcdata/"
});
```

Expand Down Expand Up @@ -80,21 +80,21 @@ WalletConnect2.init({
networks: [NetworkType.GHOSTNET],
methods: [PermissionScopeMethods.OPERATION_REQUEST],
},
registryUrl: 'https://www.tezos.help/wcdata/',
// registryUrl: 'https://www.tezos.help/wcdata/',
})
.then(() => {
Tezos.setWalletProvider(walletConnect);
Tezos.wallet
.transfer({ to: 'tz1h3rQ8wBxFd8L9B3d7Jhaawu6Z568XU3xY', amount: 1 })
.send()
.then((op) => {
println(`Waiting for ${op.opHash} to be confirmed...`);
console.log(`Waiting for ${op.opHash} to be confirmed...`);
return op.confirmation().then(() => op.opHash);
})
.then((hash) => println(`https://ghostnet.tzkt.io/${hash}`));
.then((hash) => console.log(`https://ghostnet.tzkt.io/${hash}`));
});
})
.catch((err) => println(err));
.catch((err) => console.log(err));
```

## Sign payload with `WalletConnect2`
Expand Down
58 changes: 37 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions packages/taquito-wallet-connect-2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@
"dependencies": {
"@taquito/taquito": "^20.0.1",
"@walletconnect/legacy-modal": "^2.0.0",
"@walletconnect/sign-client": "^2.15.2",
"@walletconnect/types": "^2.15.2",
"@walletconnect/utils": "^2.15.2"
"@walletconnect/sign-client": "^2.16.1",
"@walletconnect/types": "^2.16.1",
"@walletconnect/utils": "^2.16.1"
},
"devDependencies": {
"@types/bluebird": "^3.5.42",
Expand Down
Loading

0 comments on commit 500967b

Please sign in to comment.