From bfeda9116f54683e64a2597925ef32298e40ba6f Mon Sep 17 00:00:00 2001 From: tolgahan-arikan Date: Tue, 8 Aug 2023 18:26:00 +0300 Subject: [PATCH] Use default wallet url if no wallet url found in params --- src/App.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 3f1272e..752814c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -48,18 +48,16 @@ const defaultChainId = getDefaultChainId() || ChainId.MAINNET // For Sequence core dev team -- app developers can ignore // a custom wallet app url can specified in the query string const urlParams = new URLSearchParams(window.location.search) -let walletAppURL = urlParams.get('walletAppURL') +let walletAppURL = urlParams.get('walletAppURL') ?? DEFAULT_WALLET_APP_URL if (walletAppURL && walletAppURL.length > 0) { // Wallet can point to a custom wallet app url // NOTICE: this is not needed, unless testing an alpha version of the wallet sequence.initWallet({ defaultNetwork: defaultChainId, transports: { walletAppURL } }) } else { - walletAppURL = DEFAULT_WALLET_APP_URL - // Init the sequence wallet library at the top-level of your project with // your designed default chain id - sequence.initWallet({ defaultNetwork: defaultChainId }) + sequence.initWallet({ defaultNetwork: defaultChainId, transports: { walletAppURL } }) } // App component