From cd2f9e23b50bafd9350a85ab04d371de5da8fb71 Mon Sep 17 00:00:00 2001 From: "jinghao.wang" Date: Fri, 24 Nov 2023 21:15:37 +0800 Subject: [PATCH] feat: add okx wallet demo --- README.md | 1 + apps/nextjs-example/components/AppContext.tsx | 2 ++ apps/nextjs-example/package.json | 1 + pnpm-lock.yaml | 12 ++++++++++++ 4 files changed, 16 insertions(+) diff --git a/README.md b/README.md index 41453121..937e98bb 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ Note: These are in alphabetical order, any new wallets must be in alphabetical o - [TokenPocket](https://www.npmjs.com/package/@tp-lab/aptos-wallet-adapter) - [Trust](https://www.npmjs.com/package/@trustwallet/aptos-wallet-adapter) - [WELLDONE](https://www.npmjs.com/package/@welldone-studio/aptos-wallet-adapter) +- [OKX](https://www.npmjs.com/package/@okwallet/aptos-wallet-adapter) #### Develop Locally diff --git a/apps/nextjs-example/components/AppContext.tsx b/apps/nextjs-example/components/AppContext.tsx index 0911f4a0..84685e1f 100644 --- a/apps/nextjs-example/components/AppContext.tsx +++ b/apps/nextjs-example/components/AppContext.tsx @@ -12,6 +12,7 @@ import { TokenPocketWallet } from "@tp-lab/aptos-wallet-adapter"; import { TrustWallet } from "@trustwallet/aptos-wallet-adapter"; import { MSafeWalletAdapter } from "@msafe/aptos-wallet-adapter"; import { WelldoneWallet } from "@welldone-studio/aptos-wallet-adapter"; +import { OKXWallet } from '@okwallet/aptos-wallet-adapter'; import { AptosWalletAdapterProvider, NetworkName, @@ -49,6 +50,7 @@ const WalletContextProvider: FC<{ children: ReactNode }> = ({ children }) => { new TokenPocketWallet(), new TrustWallet(), new WelldoneWallet(), + new OKXWallet(), ]; return ( diff --git a/apps/nextjs-example/package.json b/apps/nextjs-example/package.json index cfbbd84d..2a2918cd 100644 --- a/apps/nextjs-example/package.json +++ b/apps/nextjs-example/package.json @@ -25,6 +25,7 @@ "@martianwallet/aptos-wallet-adapter": "^0.0.4", "@msafe/aptos-wallet-adapter": "^1.0.11", "@nightlylabs/aptos-wallet-adapter-plugin": "^0.2.12", + "@okwallet/aptos-wallet-adapter": "^0.0.3", "@openblockhq/aptos-wallet-adapter": "^0.1.5", "@pontem/wallet-adapter-plugin": "^0.2.0", "@rise-wallet/wallet-adapter": "^0.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fb1e5bc0..92573639 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -69,6 +69,9 @@ importers: '@nightlylabs/aptos-wallet-adapter-plugin': specifier: ^0.2.12 version: 0.2.12 + '@okwallet/aptos-wallet-adapter': + specifier: ^0.0.3 + version: 0.0.3 '@openblockhq/aptos-wallet-adapter': specifier: ^0.1.5 version: 0.1.5 @@ -2467,6 +2470,15 @@ packages: '@nodelib/fs.scandir': 2.1.5 fastq: 1.15.0 + /@okwallet/aptos-wallet-adapter@0.0.3: + resolution: {integrity: sha512-6/wH9A3/FswcnHEy4H6c4DXH7nEzUo7Ez8Try5B/HoTnKBvIRaYH/btWhKADzwf0dGtSDC6YdysYoQrGx4lhmA==} + dependencies: + '@aptos-labs/wallet-adapter-core': 2.1.0 + aptos: 1.20.0 + transitivePeerDependencies: + - debug + dev: false + /@open-rpc/client-js@1.8.1: resolution: {integrity: sha512-vV+Hetl688nY/oWI9IFY0iKDrWuLdYhf7OIKI6U1DcnJV7r4gAgwRJjEr1QVYszUc0gjkHoQJzqevmXMGLyA0g==} dependencies: