Skip to content

Commit

Permalink
Merge pull request #18 from WalletConnect/feat/multiple-optional-chains
Browse files Browse the repository at this point in the history
feat: adds all supported chains as optional
  • Loading branch information
ganchoradkov authored Aug 17, 2023
2 parents 95b9424 + 6e1ac6c commit 6a91b25
Show file tree
Hide file tree
Showing 8 changed files with 561 additions and 730 deletions.
6 changes: 3 additions & 3 deletions examples/dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
"dependencies": {
"@ethereumjs/tx": "^3.5.0",
"@walletconnect/encoding": "^1.0.1",
"@walletconnect/ethereum-provider": "2.8.7-canary.8",
"@walletconnect/ethereum-provider": "2.10.0",
"@walletconnect/modal": "^2.5.4",
"@walletconnect/types": "2.8.7-canary.8",
"@walletconnect/utils": "2.8.7-canary.8",
"@walletconnect/types": "2.10.0",
"@walletconnect/utils": "2.10.0",
"axios": "^0.21.1",
"blockies-ts": "^1.0.0",
"caip-api": "^2.0.0-beta.1",
Expand Down
6 changes: 5 additions & 1 deletion examples/dapp/src/contexts/ClientContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,12 @@ export function ClientContextProvider({ children }: { children: ReactNode | Reac
}

const chainId = (caipChainId.split(":").pop() || 1) as number;
let allSupportedChains = Object.keys(EIP155Metadata).map((chainId) => parseInt(chainId));
allSupportedChains = allSupportedChains.filter((chain) => chain !== chainId);
allSupportedChains.unshift(chainId);

await ethereumProvider.connect({
optionalChains: [chainId],
optionalChains: allSupportedChains,
});

createWeb3Provider(ethereumProvider);
Expand Down
84 changes: 42 additions & 42 deletions examples/dapp/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2965,24 +2965,24 @@
"@typescript-eslint/types" "4.33.0"
eslint-visitor-keys "^2.0.0"

"@walletconnect/core@2.8.7-canary.8":
version "2.8.7-canary.8"
resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.8.7-canary.8.tgz#4bfd2f1bbd79e87caca79bed5e13a1873837e525"
integrity sha512-J9HwtlqcBelcx+TS4Q21xRp6V3OymYfes5i5vKSGpIrNn5TtGe2RudzWRvKfLkIPCW2ki0JOOgOmYpFHI4+k8Q==
"@walletconnect/core@2.10.0":
version "2.10.0"
resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.10.0.tgz#b659de4dfb374becd938964abd4f2150d410e617"
integrity sha512-Z8pdorfIMueuiBXLdnf7yloiO9JIiobuxN3j0OTal+MYc4q5/2O7d+jdD1DAXbLi1taJx3x60UXT/FPVkjIqIQ==
dependencies:
"@walletconnect/heartbeat" "1.2.1"
"@walletconnect/jsonrpc-provider" "1.0.13"
"@walletconnect/jsonrpc-types" "1.0.3"
"@walletconnect/jsonrpc-utils" "1.0.8"
"@walletconnect/jsonrpc-ws-connection" "1.0.12"
"@walletconnect/jsonrpc-ws-connection" "1.0.13"
"@walletconnect/keyvaluestorage" "^1.0.2"
"@walletconnect/logger" "^2.0.1"
"@walletconnect/relay-api" "^1.0.9"
"@walletconnect/relay-auth" "^1.0.4"
"@walletconnect/safe-json" "^1.0.2"
"@walletconnect/time" "^1.0.2"
"@walletconnect/types" "2.8.7-canary.8"
"@walletconnect/utils" "2.8.7-canary.8"
"@walletconnect/types" "2.10.0"
"@walletconnect/utils" "2.10.0"
events "^3.3.0"
lodash.isequal "4.5.0"
uint8arrays "^3.1.0"
Expand All @@ -3003,19 +3003,19 @@
dependencies:
tslib "1.14.1"

"@walletconnect/ethereum-provider@2.8.7-canary.8":
version "2.8.7-canary.8"
resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.8.7-canary.8.tgz#38e7e57ca25cf0eae46be2dadc2f37edb8abc9cd"
integrity sha512-4DCalJJan6fmNBdgq7E/B5d572FMa1c3gy4swlCOA8F0YGX7qK5bqHGb8UCZx9xJy0HNXxhzaP1jKzxgboQyag==
"@walletconnect/ethereum-provider@2.10.0":
version "2.10.0"
resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.10.0.tgz#eebde38674222a48be35bb4aa3f6a74247ba059b"
integrity sha512-NyTm7RcrtAiSaYQPh6G4sOtr1kg/pL5Z3EDE6rBTV3Se5pMsYvtuwMiSol7MidsQpf4ux9HFhthTO3imcoWImw==
dependencies:
"@walletconnect/jsonrpc-http-connection" "^1.0.7"
"@walletconnect/jsonrpc-provider" "^1.0.13"
"@walletconnect/jsonrpc-types" "^1.0.3"
"@walletconnect/jsonrpc-utils" "^1.0.8"
"@walletconnect/sign-client" "2.8.7-canary.8"
"@walletconnect/types" "2.8.7-canary.8"
"@walletconnect/universal-provider" "2.8.7-canary.8"
"@walletconnect/utils" "2.8.7-canary.8"
"@walletconnect/sign-client" "2.10.0"
"@walletconnect/types" "2.10.0"
"@walletconnect/universal-provider" "2.10.0"
"@walletconnect/utils" "2.10.0"
events "^3.3.0"

"@walletconnect/events@^1.0.1":
Expand Down Expand Up @@ -3088,10 +3088,10 @@
"@walletconnect/jsonrpc-types" "^1.0.2"
tslib "1.14.1"

"@walletconnect/[email protected].12":
version "1.0.12"
resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.12.tgz#2192314884fabdda6d0a9d22e157e5b352025ed8"
integrity sha512-HAcadga3Qjt1Cqy+qXEW6zjaCs8uJGdGQrqltzl3OjiK4epGZRdvSzTe63P+t/3z+D2wG+ffEPn0GVcDozmN1w==
"@walletconnect/[email protected].13":
version "1.0.13"
resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.13.tgz#23b0cdd899801bfbb44a6556936ec2b93ef2adf4"
integrity sha512-mfOM7uFH4lGtQxG+XklYuFBj6dwVvseTt5/ahOkkmpcAEgz2umuzu7fTR+h5EmjQBdrmYyEBOWADbeaFNxdySg==
dependencies:
"@walletconnect/jsonrpc-utils" "^1.0.6"
"@walletconnect/safe-json" "^1.0.2"
Expand Down Expand Up @@ -3175,19 +3175,19 @@
dependencies:
tslib "1.14.1"

"@walletconnect/sign-client@2.8.7-canary.8":
version "2.8.7-canary.8"
resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.8.7-canary.8.tgz#1a4fe76a710a92f8402c4d90ff6ad6ac2880ba9d"
integrity sha512-q4lxHZyd8DXFa7wNExLPLVY9DjUxPj0honDXpnj052jnuDC3+8Y7Sjf6pprvC5fMzGk2XXjpHuaC5eVjnyJUew==
"@walletconnect/sign-client@2.10.0":
version "2.10.0"
resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.10.0.tgz#0fee8f12821e37783099f0c7bd64e6efdfbd9d86"
integrity sha512-hbDljDS53kR/It3oXD91UkcOsT6diNnW5+Zzksm0YEfwww5dop/YfNlcdnc8+jKUhWOL/YDPNQCjzsCSNlVzbw==
dependencies:
"@walletconnect/core" "2.8.7-canary.8"
"@walletconnect/core" "2.10.0"
"@walletconnect/events" "^1.0.1"
"@walletconnect/heartbeat" "1.2.1"
"@walletconnect/jsonrpc-utils" "1.0.8"
"@walletconnect/logger" "^2.0.1"
"@walletconnect/time" "^1.0.2"
"@walletconnect/types" "2.8.7-canary.8"
"@walletconnect/utils" "2.8.7-canary.8"
"@walletconnect/types" "2.10.0"
"@walletconnect/utils" "2.10.0"
events "^3.3.0"

"@walletconnect/time@^1.0.2":
Expand All @@ -3197,10 +3197,10 @@
dependencies:
tslib "1.14.1"

"@walletconnect/types@2.8.7-canary.8":
version "2.8.7-canary.8"
resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.8.7-canary.8.tgz#424e4e67817a05f3edd84e2c8357eb3f68e92b94"
integrity sha512-FLf1Pt6IBdo2mvM3AZ1yzWIasBG7J4SWQmE5Y8qacdhSo+q/+MFPeQAxmE1GJvf9B6FAtn4ILPMFkuoYpdB/Nw==
"@walletconnect/types@2.10.0":
version "2.10.0"
resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.10.0.tgz#5d63235b49e03d609521402a4b49627dbc4ed514"
integrity sha512-kSTA/WZnbKdEbvbXSW16Ty6dOSzOZCHnGg6JH7q1MuraalD2HuNg00lVVu7QAZ/Rj1Gn9DAkrgP5Wd5a8Xq//Q==
dependencies:
"@walletconnect/events" "^1.0.1"
"@walletconnect/heartbeat" "1.2.1"
Expand All @@ -3209,25 +3209,25 @@
"@walletconnect/logger" "^2.0.1"
events "^3.3.0"

"@walletconnect/universal-provider@2.8.7-canary.8":
version "2.8.7-canary.8"
resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.8.7-canary.8.tgz#8c9c04adf82bccc249ec36b4998f8932389fb2cf"
integrity sha512-1pdPcJs4rK1ddEMV0p5EEDRqU4hNTWX33/LH3yGR4QHo0kq6afRwIlFxMcx1RvCMpoLOgGcllJC4Vy8ig7IZJg==
"@walletconnect/universal-provider@2.10.0":
version "2.10.0"
resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.10.0.tgz#565d6478dcb5cc66955e5f03d6a00f51c9bcac14"
integrity sha512-jtVWf+AeTCqBcB3lCmWkv3bvSmdRCkQdo67GNoT5y6/pvVHMxfjgrJNBOUsWQMxpREpWDpZ993X0JRjsYVsMcA==
dependencies:
"@walletconnect/jsonrpc-http-connection" "^1.0.7"
"@walletconnect/jsonrpc-provider" "1.0.13"
"@walletconnect/jsonrpc-types" "^1.0.2"
"@walletconnect/jsonrpc-utils" "^1.0.7"
"@walletconnect/logger" "^2.0.1"
"@walletconnect/sign-client" "2.8.7-canary.8"
"@walletconnect/types" "2.8.7-canary.8"
"@walletconnect/utils" "2.8.7-canary.8"
"@walletconnect/sign-client" "2.10.0"
"@walletconnect/types" "2.10.0"
"@walletconnect/utils" "2.10.0"
events "^3.3.0"

"@walletconnect/utils@2.8.7-canary.8":
version "2.8.7-canary.8"
resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.8.7-canary.8.tgz#b231602c15a748a8f88917db2bfe930761b91222"
integrity sha512-bEtZi8IFwdNXQpLe8IBMJLLQI7SoW0H66rql1/UNFPp0+CX1eT64unpzfq5imN1YYOjLXepOgIVILtcpiIHnVQ==
"@walletconnect/utils@2.10.0":
version "2.10.0"
resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.10.0.tgz#6918d12180d797b8bd4a19fb2ff128e394e181d6"
integrity sha512-9GRyEz/7CJW+G04RvrjPET5k7hOEsB9b3fF9cWDk/iDCxSWpbkU/hv/urRB36C+gvQMAZgIZYX3dHfzJWkY/2g==
dependencies:
"@stablelib/chacha20poly1305" "1.0.1"
"@stablelib/hkdf" "1.0.1"
Expand All @@ -3237,7 +3237,7 @@
"@walletconnect/relay-api" "^1.0.9"
"@walletconnect/safe-json" "^1.0.2"
"@walletconnect/time" "^1.0.2"
"@walletconnect/types" "2.8.7-canary.8"
"@walletconnect/types" "2.10.0"
"@walletconnect/window-getters" "^1.0.1"
"@walletconnect/window-metadata" "^1.0.1"
detect-browser "5.3.0"
Expand Down
8 changes: 4 additions & 4 deletions examples/wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"dependencies": {
"@json-rpc-tools/utils": "1.7.6",
"@nextui-org/react": "1.0.0-beta.12",
"@walletconnect/core": "2.8.2",
"@walletconnect/se-sdk": "1.5.0-canary.7",
"@walletconnect/utils": "2.8.2",
"@walletconnect/core": "2.10.0",
"@walletconnect/se-sdk": "1.5.0-canary-179a94",
"@walletconnect/utils": "2.10.0",
"ethers": "5.7.2",
"framer-motion": "9.0.2",
"next": "12.2.0",
Expand All @@ -28,7 +28,7 @@
"devDependencies": {
"@types/node": "18.13.0",
"@types/react": "18.0.28",
"@walletconnect/types": "2.8.2",
"@walletconnect/types": "2.10.0",
"eslint": "8.34.0",
"eslint-config-next": "13.1.6",
"eslint-config-prettier": "8.6.0",
Expand Down
Loading

2 comments on commit 6a91b25

@vercel
Copy link

@vercel vercel bot commented on 6a91b25 Aug 17, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

se-sdk-dapp – ./examples/dapp/

se-sdk-dapp.vercel.app
se-sdk-dapp-walletconnect1.vercel.app
se-sdk-dapp-git-main-walletconnect1.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 6a91b25 Aug 17, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

se-sdk-wallet – ./examples/wallet/

se-sdk-wallet-walletconnect1.vercel.app
se-sdk-wallet.vercel.app
se-sdk-wallet-git-main-walletconnect1.vercel.app

Please sign in to comment.