diff options
author | Florian Dold <florian@dold.me> | 2021-04-07 19:29:51 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-04-07 19:29:51 +0200 |
commit | 4fa88007f958796d7fe65d0fe4f6f45fcf953887 (patch) | |
tree | 4f6e5798cc74b19b6eda13dfcd5daa855a5c8c9a /packages/taler-wallet-core/src/operations/backup/export.ts | |
parent | 29d710c392c2b28e8c8c2a177c8de40061a58e77 (diff) | |
download | wallet-core-4fa88007f958796d7fe65d0fe4f6f45fcf953887.tar.xz |
get coin re-selection after accidental double spending to work
Diffstat (limited to 'packages/taler-wallet-core/src/operations/backup/export.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/backup/export.ts | 54 |
1 files changed, 45 insertions, 9 deletions
diff --git a/packages/taler-wallet-core/src/operations/backup/export.ts b/packages/taler-wallet-core/src/operations/backup/export.ts index c6e24289f..07c7b9ece 100644 --- a/packages/taler-wallet-core/src/operations/backup/export.ts +++ b/packages/taler-wallet-core/src/operations/backup/export.ts @@ -14,15 +14,6 @@ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> */ -import { hash } from "../../crypto/primitives/nacl-fast"; -import { WalletBackupContentV1, BackupExchange, BackupCoin, BackupDenomination, BackupReserve, BackupPurchase, BackupProposal, BackupRefreshGroup, BackupBackupProvider, BackupTip, BackupRecoupGroup, BackupWithdrawalGroup, BackupBackupProviderTerms, BackupCoinSource, BackupCoinSourceType, BackupExchangeWireFee, BackupRefundItem, BackupRefundState, BackupProposalStatus, BackupRefreshOldCoin, BackupRefreshSession } from "@gnu-taler/taler-util"; -import { canonicalizeBaseUrl, canonicalJson } from "../../util/helpers"; -import { InternalWalletState } from "../state"; -import { provideBackupState, getWalletBackupState, WALLET_BACKUP_STATE_KEY } from "./state"; -import { Amounts, getTimestampNow } from "@gnu-taler/taler-util"; -import { Stores, CoinSourceType, CoinStatus, RefundState, AbortStatus, ProposalStatus } from "../../db.js"; -import { encodeCrock, stringToBytes, getRandomBytes } from "../../index.js"; - /** * Implementation of wallet backups (export/import/upload) and sync * server management. @@ -30,6 +21,51 @@ import { encodeCrock, stringToBytes, getRandomBytes } from "../../index.js"; * @author Florian Dold <dold@taler.net> */ +/** + * Imports. + */ +import { hash } from "../../crypto/primitives/nacl-fast"; +import { + WalletBackupContentV1, + BackupExchange, + BackupCoin, + BackupDenomination, + BackupReserve, + BackupPurchase, + BackupProposal, + BackupRefreshGroup, + BackupBackupProvider, + BackupTip, + BackupRecoupGroup, + BackupWithdrawalGroup, + BackupBackupProviderTerms, + BackupCoinSource, + BackupCoinSourceType, + BackupExchangeWireFee, + BackupRefundItem, + BackupRefundState, + BackupProposalStatus, + BackupRefreshOldCoin, + BackupRefreshSession, +} from "@gnu-taler/taler-util"; +import { InternalWalletState } from "../state"; +import { + provideBackupState, + getWalletBackupState, + WALLET_BACKUP_STATE_KEY, +} from "./state"; +import { Amounts, getTimestampNow } from "@gnu-taler/taler-util"; +import { + Stores, + CoinSourceType, + CoinStatus, + RefundState, + AbortStatus, + ProposalStatus, +} from "../../db.js"; +import { encodeCrock, stringToBytes, getRandomBytes } from "../../index.js"; +import { canonicalizeBaseUrl, canonicalJson } from "@gnu-taler/taler-util"; + export async function exportBackup( ws: InternalWalletState, ): Promise<WalletBackupContentV1> { |