diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/platform/api.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/platform/api.ts | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/packages/taler-wallet-webextension/src/platform/api.ts b/packages/taler-wallet-webextension/src/platform/api.ts index f87500c4f..f8fa0a848 100644 --- a/packages/taler-wallet-webextension/src/platform/api.ts +++ b/packages/taler-wallet-webextension/src/platform/api.ts @@ -15,7 +15,11 @@ */ import { CoreApiResponse, NotificationType } from "@gnu-taler/taler-util"; -import { WalletOperations } from "@gnu-taler/taler-wallet-core"; +import { + WalletConfig, + WalletConfigParameter, + WalletOperations, +} from "@gnu-taler/taler-wallet-core"; import { BackgroundOperations } from "../wxApi.js"; import { ExtensionOperations, @@ -87,12 +91,35 @@ export interface WalletWebExVersion { version: string; } -export interface Settings { +type F = WalletConfig["features"]; +type kf = keyof F; +type WebexWalletConfig = { + [P in keyof F as `wallet${Capitalize<P>}`]: F[P]; +}; + +export interface Settings extends WebexWalletConfig { injectTalerSupport: boolean; + advanceMode: boolean; + backup: boolean; + langSelector: boolean; + showJsonOnError: boolean; + extendedAccountTypes: boolean; + //WORKAROUND + //Able to delete tx in dev mode + //FIXME: remove this when DD37 is implemented + deleteActiveTransactions: boolean; } export const defaultSettings: Settings = { injectTalerSupport: false, + advanceMode: false, + backup: false, + langSelector: false, + deleteActiveTransactions: false, + showJsonOnError: false, + extendedAccountTypes: false, + walletAllowHttp: false, + walletBatchWithdrawal: false, }; /** |