diff options
Diffstat (limited to 'packages/demobank-ui/src/pages/BankFrame.tsx')
-rw-r--r-- | packages/demobank-ui/src/pages/BankFrame.tsx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/packages/demobank-ui/src/pages/BankFrame.tsx b/packages/demobank-ui/src/pages/BankFrame.tsx index 5fef04b66..34c39e9d3 100644 --- a/packages/demobank-ui/src/pages/BankFrame.tsx +++ b/packages/demobank-ui/src/pages/BankFrame.tsx @@ -23,6 +23,7 @@ import { useBackendState } from "../hooks/backend.js"; import { getAllBooleanPreferences, getLabelForPreferences, usePreferences } from "../hooks/preferences.js"; import { RenderAmount } from "./PaytoWireTransferForm.js"; import { useSettingsContext } from "../context/settings.js"; +import { useBankCoreApiContext } from "../context/config.js"; const GIT_HASH = typeof __GIT_HASH__ !== "undefined" ? __GIT_HASH__ : undefined; const VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : undefined; @@ -45,8 +46,8 @@ export function BankFrame({ useEffect(() => { if (error) { const desc = (error instanceof Error ? error.stack : String(error)) as TranslatedString + console.log(error) if (error instanceof Error) { - console.log(error) notifyException(i18n.str`Internal error, please report.`, error) } else { notifyError(i18n.str`Internal error, please report.`, String(error) as TranslatedString) @@ -118,9 +119,9 @@ export function BankFrame({ <Footer testingUrl={ - (typeof localStorage !== "undefined") && localStorage.getItem("bank-base-url") ? - localStorage.getItem("bank-base-url") ?? undefined : - undefined} + (typeof localStorage !== "undefined") && localStorage.getItem("bank-base-url") ? + localStorage.getItem("bank-base-url") ?? undefined : + undefined} GIT_HASH={GIT_HASH} VERSION={VERSION} /> @@ -172,6 +173,7 @@ function WelcomeAccount({ account: accountName }: { account: string }): VNode { function AccountBalance({ account }: { account: string }): VNode { const result = useAccountDetails(account); + const { config } = useBankCoreApiContext(); if (!result) { return <Loading /> } @@ -183,5 +185,6 @@ function AccountBalance({ account }: { account: string }): VNode { return <RenderAmount value={Amounts.parseOrThrow(result.body.balance.amount)} negative={result.body.balance.credit_debit_indicator === "debit"} + spec={config.currency_specification} /> } |