diff --git a/apps/sample-vanilla-app/index.js b/apps/sample-vanilla-app/index.js index 11a0ba87..d868a018 100644 --- a/apps/sample-vanilla-app/index.js +++ b/apps/sample-vanilla-app/index.js @@ -1,7 +1,26 @@ -import '@vechain/vanilla-wallet-kit'; +// eslint-disable-next-line eslint-comments/disable-enable-pair +/* eslint-disable no-undef */ +import { + VechainWalletKit, + VechainWalletKitModal, +} from '@vechain/vanilla-wallet-kit'; -// eslint-disable-next-line no-undef -addEventListener('vwk-source-card-clicked', (e) => { - // eslint-disable-next-line no-console - console.log('vwk-source-card-clicked', e.detail); -}); +const walletConnectOptions = { + projectId: 'a0b855ceaf109dbc8426479a4c3d38d8', + metadata: { + name: 'Sample VeChain dApp', + description: 'A sample VeChain dApp', + url: window.location.origin, + icons: [`${window.location.origin}/images/logo/my-dapp.png`], + }, +}; + +const vechainWalletKitOptions = { + node: 'https://testnet.vechain.org/', + network: 'test', + walletConnectOptions, +}; + +const walletKit = new VechainWalletKit(vechainWalletKitOptions); +const vechainWalletKit = new VechainWalletKitModal(walletKit); +vechainWalletKit.initModalListeners(); diff --git a/packages/vanilla-wallet-kit/index.html b/packages/vanilla-wallet-kit/index.html index 1e4b7a53..61f4d410 100644 --- a/packages/vanilla-wallet-kit/index.html +++ b/packages/vanilla-wallet-kit/index.html @@ -8,7 +8,7 @@