From 66eaec4cb4ddf25b9ef0657fe0522256877c1254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Thu, 13 Feb 2025 16:42:32 +0100 Subject: [PATCH] fix: missing wallet api in new-constitution action --- govtool/frontend/src/context/wallet.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/govtool/frontend/src/context/wallet.tsx b/govtool/frontend/src/context/wallet.tsx index 24e397613..dc0a7bf8d 100644 --- a/govtool/frontend/src/context/wallet.tsx +++ b/govtool/frontend/src/context/wallet.tsx @@ -296,6 +296,7 @@ const CardanoProvider = (props: Props) => { const [walletApi, setWalletApi] = useState( undefined, ); + const [address, setAddress] = useState(undefined); const [pubDRepKey, setPubDRepKey] = useState(""); const [dRepID, setDRepID] = useState(""); @@ -383,6 +384,7 @@ const CardanoProvider = (props: Props) => { }); await getChangeAddress(enabledApi); await getUsedAddresses(enabledApi); + setIsEnabled(true); setWalletApi(enabledApi); // Check if wallet has enabled the CIP-95 extension @@ -474,6 +476,7 @@ const CardanoProvider = (props: Props) => { return { status: t("ok"), stakeKey: stakeKeySet }; } catch (e) { + console.error({ e }); console.error(e); setError(`${e}`); setAddress(undefined); @@ -1087,7 +1090,7 @@ const CardanoProvider = (props: Props) => { console.error(e); } }, - [], + [epochParams?.gov_action_deposit, getRewardAddress], ); // update committee action @@ -1163,7 +1166,11 @@ const CardanoProvider = (props: Props) => { console.error(e); } }, - [], + [ + buildCredentialFromBech32Key, + epochParams?.gov_action_deposit, + getRewardAddress, + ], ); // info action @@ -1226,7 +1233,7 @@ const CardanoProvider = (props: Props) => { console.error(err); } }, - [], + [epochParams?.gov_action_deposit, getRewardAddress], ); // treasury action