diff options
author | Sebastian <sebasjm@gmail.com> | 2021-07-01 11:33:26 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2021-07-01 11:33:49 -0300 |
commit | 26a12809605ac8099acf7931676bfbad0298a3f2 (patch) | |
tree | 75726a6fd2cb5aa065e123893312dcc49c4ce199 /packages/taler-wallet-webextension/src/wxApi.ts | |
parent | 7ba33273225edbdce74e9b33e964e667fe31c453 (diff) | |
download | wallet-core-26a12809605ac8099acf7931676bfbad0298a3f2.tar.xz |
first working version of provider
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 |