From f489758bd6e8f56c3c73f9e1a771980937730424 Mon Sep 17 00:00:00 2001 From: Carlos Fontes Date: Fri, 20 Sep 2024 12:05:50 +0100 Subject: [PATCH] chore: fixes on `useCreatePayoutProposal` --- .../PayoutStatusPage/useCreatePayoutProposal.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/web/src/pages/CommitteeTools/PayoutsTool/PayoutStatusPage/useCreatePayoutProposal.ts b/packages/web/src/pages/CommitteeTools/PayoutsTool/PayoutStatusPage/useCreatePayoutProposal.ts index 182849862..1a9a144a2 100644 --- a/packages/web/src/pages/CommitteeTools/PayoutsTool/PayoutStatusPage/useCreatePayoutProposal.ts +++ b/packages/web/src/pages/CommitteeTools/PayoutsTool/PayoutStatusPage/useCreatePayoutProposal.ts @@ -14,10 +14,17 @@ export const useCreatePayoutProposal = (vault?: IVault, payout?: IPayoutResponse const create = async () => { try { - if (!vault || !payout || !account) return; + if (!vault || !payout || !account) return false; setIsLoading(true); - const multisigAddress = utils.getAddress(vault.committee ?? ""); + let multisigAddress: string | undefined; + try { + multisigAddress = utils.getAddress(vault.committee ?? ""); + } catch (error) { + console.log(error); + return false; + } + if (!multisigAddress) { alert("No vault multisig address. Please contact Hats team with this error."); return false;