aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/backup
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-03-07 12:09:38 +0100
committerFlorian Dold <florian@dold.me>2022-03-07 12:09:38 +0100
commit0290c5fd379a4b4262d8835d4131b7c4e8a2f2f2 (patch)
tree233cbe5e18925339daedfaffb2882d390b3479a5 /packages/taler-wallet-core/src/operations/backup
parent2cfefa93920eba7bc4bfa3ca788a7bcf74c149f5 (diff)
downloadwallet-core-0290c5fd379a4b4262d8835d4131b7c4e8a2f2f2.tar.xz
address protocol changes in the exchange
The exchange now has a wad fee and truncates the payto hash in signatures
Diffstat (limited to 'packages/taler-wallet-core/src/operations/backup')
-rw-r--r--packages/taler-wallet-core/src/operations/backup/export.ts6
-rw-r--r--packages/taler-wallet-core/src/operations/backup/import.ts1
2 files changed, 4 insertions, 3 deletions
diff --git a/packages/taler-wallet-core/src/operations/backup/export.ts b/packages/taler-wallet-core/src/operations/backup/export.ts
index 75724dca7..05ef66883 100644
--- a/packages/taler-wallet-core/src/operations/backup/export.ts
+++ b/packages/taler-wallet-core/src/operations/backup/export.ts
@@ -113,9 +113,8 @@ export async function exportBackup(
} = {};
await tx.withdrawalGroups.iter().forEachAsync(async (wg) => {
- const withdrawalGroups = (withdrawalGroupsByReserve[
- wg.reservePub
- ] ??= []);
+ const withdrawalGroups = (withdrawalGroupsByReserve[wg.reservePub] ??=
+ []);
withdrawalGroups.push({
raw_withdrawal_amount: Amounts.stringify(wg.rawWithdrawalAmount),
selected_denoms: wg.denomsSel.selectedDenoms.map((x) => ({
@@ -288,6 +287,7 @@ export async function exportBackup(
wireFees.push({
wire_type: x,
closing_fee: Amounts.stringify(f.closingFee),
+ wad_fee: Amounts.stringify(f.wadFee),
end_stamp: f.endStamp,
sig: f.sig,
start_stamp: f.startStamp,
diff --git a/packages/taler-wallet-core/src/operations/backup/import.ts b/packages/taler-wallet-core/src/operations/backup/import.ts
index 21b10a945..6dafa8c89 100644
--- a/packages/taler-wallet-core/src/operations/backup/import.ts
+++ b/packages/taler-wallet-core/src/operations/backup/import.ts
@@ -305,6 +305,7 @@ export async function importBackup(
sig: fee.sig,
startStamp: fee.start_stamp,
wireFee: Amounts.parseOrThrow(fee.wire_fee),
+ wadFee: Amounts.parseOrThrow(fee.wad_fee),
});
}
await tx.exchangeDetails.put({