diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/wxApi.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/wxApi.ts | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/packages/taler-wallet-webextension/src/wxApi.ts b/packages/taler-wallet-webextension/src/wxApi.ts index 81f418d40..393c41102 100644 --- a/packages/taler-wallet-webextension/src/wxApi.ts +++ b/packages/taler-wallet-webextension/src/wxApi.ts @@ -38,8 +38,8 @@ import { DeleteTransactionRequest, RetryTransactionRequest, } from "@gnu-taler/taler-util"; -import { BackupProviderState, OperationFailedError } from "@gnu-taler/taler-wallet-core"; -import { BackupInfo } from "@gnu-taler/taler-wallet-core/src/operations/backup"; +import { AddBackupProviderRequest, BackupProviderState, OperationFailedError } from "@gnu-taler/taler-wallet-core"; +import { BackupInfo } from "@gnu-taler/taler-wallet-core"; export interface ExtendedPermissionsResponse { newValue: boolean; @@ -166,9 +166,26 @@ export function listKnownCurrencies(): Promise<ListOfKnownCurrencies> { /** * Get information about the current state of wallet backups. */ - export function getBackupInfo(): Promise<BackupInfo> { +export function getBackupInfo(): Promise<BackupInfo> { return callBackend("getBackupInfo", {}) } + +/** + * Add a backup provider and activate it + */ +export function addBackupProvider(backupProviderBaseUrl: string): Promise<void> { + return callBackend("addBackupProvider", { + backupProviderBaseUrl, activate: true + } as AddBackupProviderRequest) +} + +export function syncAllProviders(): Promise<void> { + return callBackend("runBackupCycle", {}) +} + + + + /** * Retry a transaction * @param transactionId |