Skip to content

Commit

Permalink
Merge pull request #2980 from IntersectMBO/fix/missing-wallet-api-in-…
Browse files Browse the repository at this point in the history
…new-constitution-action

fix: missing wallet api in new-constitution action
  • Loading branch information
MSzalowski authored Feb 13, 2025
2 parents 84a66b3 + 66eaec4 commit 52cbbaf
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions govtool/frontend/src/context/wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ const CardanoProvider = (props: Props) => {
const [walletApi, setWalletApi] = useState<CardanoApiWallet | undefined>(
undefined,
);

const [address, setAddress] = useState<string | undefined>(undefined);
const [pubDRepKey, setPubDRepKey] = useState<string>("");
const [dRepID, setDRepID] = useState<string>("");
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -1087,7 +1090,7 @@ const CardanoProvider = (props: Props) => {
console.error(e);
}
},
[],
[epochParams?.gov_action_deposit, getRewardAddress],
);

// update committee action
Expand Down Expand Up @@ -1163,7 +1166,11 @@ const CardanoProvider = (props: Props) => {
console.error(e);
}
},
[],
[
buildCredentialFromBech32Key,
epochParams?.gov_action_deposit,
getRewardAddress,
],
);

// info action
Expand Down Expand Up @@ -1226,7 +1233,7 @@ const CardanoProvider = (props: Props) => {
console.error(err);
}
},
[],
[epochParams?.gov_action_deposit, getRewardAddress],
);

// treasury action
Expand Down

0 comments on commit 52cbbaf

Please sign in to comment.