From efd3d7b8fdb514e0ccab22326be66152703b9d6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Tue, 3 Dec 2024 16:03:21 +0100 Subject: [PATCH] fix(#2408): fix app crash on delegation --- CHANGELOG.md | 1 + govtool/frontend/src/hooks/useDelegateToDrep.ts | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48280e697..199dfbe48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ changes. - Fix fetching voting power of newly registerd DRep [Issue 2407](https://github.com/IntersectMBO/govtool/issues/2407) - Fix inconsistent voting status [Issue 1713](https://github.com/IntersectMBO/govtool/issues/1713) - Fix removing a child (link) when is not registed in DOM [Issue 2398](https://github.com/IntersectMBO/govtool/issues/2398) +- Fix blank screen on DRep delegation when UTXos are missing [Issue 2408](https://github.com/IntersectMBO/govtool/issues/2408) ### Changed diff --git a/govtool/frontend/src/hooks/useDelegateToDrep.ts b/govtool/frontend/src/hooks/useDelegateToDrep.ts index 31509d14d..179e17457 100644 --- a/govtool/frontend/src/hooks/useDelegateToDrep.ts +++ b/govtool/frontend/src/hooks/useDelegateToDrep.ts @@ -52,8 +52,12 @@ export const useDelegateTodRep = () => { voter, }); } catch (error) { + console.error({ error }); openWalletErrorModal({ - error, + error: + typeof error === "string" + ? error + : (error as { message: string | null })?.message, dataTestId: "delegate-transaction-error-modal", }); Sentry.setTag("hook", "useDelegateTodRep");