aboutsummaryrefslogtreecommitdiff
path: root/packages/bank-ui/src/settings.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/bank-ui/src/settings.ts')
-rw-r--r--packages/bank-ui/src/settings.ts16
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()),