From 0bc7296b65ee4c5182fcff728785c9cab48323fa Mon Sep 17 00:00:00 2001 From: "Justin (HoangVD2)" Date: Wed, 13 Mar 2024 14:15:52 +0700 Subject: [PATCH] fix: revert Solana Adapter XDEFI Integration --- .../solana-adapter-xdefi-integration.md | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/developers/solana-adapter-xdefi-integration.md b/developers/solana-adapter-xdefi-integration.md index a8056ffd3..435dcc7a0 100644 --- a/developers/solana-adapter-xdefi-integration.md +++ b/developers/solana-adapter-xdefi-integration.md @@ -1 +1,65 @@ # Solana Adapter XDEFI Integration + +# Extension Wallet Solana Integration + +[[toc]] + +## Using Solana Adapter + +### Solana Adapter not installed + +Install the latest wallets package: + +```bash +npm install @solana/wallet-adapter-xdefi@latest +``` + +Once installed, you can add XDEFI Wallet by making adding this part of code: + +```js:line-numbers {0} +import { XDEFIWalletAdapter } from `@solana/wallet-adapter-xdefi`; +import { /* ... other adapters ... */ } from `@solana/wallet-adapter-wallets`; + +const wallets = useMemo( + () => [ + new XDEFIWalletAdapter(), + // ... other adapters ... + ], + [] +); + + +``` + +### Solana Adapter already installed + +Install the latest wallets package: + +```bash +npm install @solana/wallet-adapter-wallets@latest +``` + +Once installed, you can add XDEFI Wallet by making 2 changes: + +```js:line-numbers {0} +import { + XDEFIWalletAdapter, // [!code ++] + /* ... other adapters ... */ +} from `@solana/wallet-adapter-wallets`; + +const wallets = useMemo( + () => [ + new XDEFIWalletAdapter(), // [!code ++] + // ... other adapters ... + ], + [] +); + + +``` + +## Using XDEFI Provider + +## Using XDEFI SDK + +TBD