From 1f5ffb8bf3eaf0c9b9e6126cefeb157c6c147811 Mon Sep 17 00:00:00 2001 From: mrnaveira <47919901+mrnaveira@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:14:47 +0100 Subject: [PATCH] fix npm warnings --- .../src/Components/WalletConnectLink/WalletConnectLink.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/applications/tari_dan_wallet_web_ui/src/Components/WalletConnectLink/WalletConnectLink.tsx b/applications/tari_dan_wallet_web_ui/src/Components/WalletConnectLink/WalletConnectLink.tsx index 00417268b..4cbe3e8ac 100644 --- a/applications/tari_dan_wallet_web_ui/src/Components/WalletConnectLink/WalletConnectLink.tsx +++ b/applications/tari_dan_wallet_web_ui/src/Components/WalletConnectLink/WalletConnectLink.tsx @@ -52,7 +52,7 @@ const ConnectorDialog = () => { const theme = useTheme(); const [_chosenOptionalPermissions, setChosenOptionalPermissions] = useState([]); - const [web3wallet, setWeb3wallet] = useState(); + const [web3wallet, setWeb3wallet] = useState(); // TODO: send permissions on WC request const permissions: TariPermission[] = [ @@ -62,7 +62,10 @@ const ConnectorDialog = () => { ]; const optionalPermissions: TariPermission[] = []; - async function createWallet(): Web3Wallet | null { + async function createWallet(): Promise { + if (!projectId) + return null; + const core = new Core({ projectId }); const wallet = await Web3Wallet.init({ core: core,