diff options
author | Sebastian <sebasjm@gmail.com> | 2024-06-10 18:29:23 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-06-10 18:29:23 -0300 |
commit | 32aea1525551b18e8068f719f1361f3e91a23f70 (patch) | |
tree | b3480ecedf421f3948a223aeb64944255fb5f978 /packages/bank-ui/src/settings.ts | |
parent | d96c47a00a34244f790d544aeed29e9880ae578d (diff) | |
download | wallet-core-32aea1525551b18e8068f719f1361f3e91a23f70.tar.xz |
fix #8863
Diffstat (limited to 'packages/bank-ui/src/settings.ts')
-rw-r--r-- | packages/bank-ui/src/settings.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/bank-ui/src/settings.ts b/packages/bank-ui/src/settings.ts index c085c7cd8..6d8f7b850 100644 --- a/packages/bank-ui/src/settings.ts +++ b/packages/bank-ui/src/settings.ts @@ -20,6 +20,7 @@ import { canonicalizeBaseUrl, codecForBoolean, codecForMap, + codecForNumber, codecForString, codecOptional, } from "@gnu-taler/taler-util"; @@ -45,6 +46,17 @@ export interface UiSettings { // - value: link target, where the user is going to be redirected // default: empty list topNavSites?: Record<string, string>; + // Use the withdrawal form which redirect the user to the wallet + // without asking the amount to the user. + // - true: on withdrawal creation the spa will use suggested_amount instead + // of fixed amount + // - false: on withdrawal creation the spa will use fixed amount + // default: false + fastWithdrawalForm?: boolean; + // When the withdrawal form use the suggested amount the bank + // will send a default value that the user can change. + // default: 10 + defaultSuggestedAmount?: number; } /** @@ -56,12 +68,16 @@ const defaultSettings: UiSettings = { simplePasswordForRandomAccounts: false, allowRandomAccountCreation: false, topNavSites: {}, + fastWithdrawalForm: false, + defaultSuggestedAmount: 10, }; const codecForUISettings = (): Codec<UiSettings> => buildCodecForObject<UiSettings>() .property("backendBaseURL", codecOptional(codecForString())) .property("allowRandomAccountCreation", codecOptional(codecForBoolean())) + .property("fastWithdrawalForm", codecOptional(codecForBoolean())) + .property("defaultSuggestedAmount", codecOptional(codecForNumber())) .property( "simplePasswordForRandomAccounts", codecOptional(codecForBoolean()), |