formatting
This commit is contained in:
parent
9699510369
commit
0b854299d1
@ -48,7 +48,10 @@ import {
|
|||||||
} from "../../db.js";
|
} from "../../db.js";
|
||||||
import { PayCoinSelection } from "../../util/coinSelection.js";
|
import { PayCoinSelection } from "../../util/coinSelection.js";
|
||||||
import { j2s } from "@gnu-taler/taler-util";
|
import { j2s } from "@gnu-taler/taler-util";
|
||||||
import { checkDbInvariant, checkLogicInvariant } from "../../util/invariants.js";
|
import {
|
||||||
|
checkDbInvariant,
|
||||||
|
checkLogicInvariant,
|
||||||
|
} from "../../util/invariants.js";
|
||||||
import { Logger } from "@gnu-taler/taler-util";
|
import { Logger } from "@gnu-taler/taler-util";
|
||||||
import { initRetryInfo } from "../../util/retries.js";
|
import { initRetryInfo } from "../../util/retries.js";
|
||||||
import { InternalWalletState } from "../../common.js";
|
import { InternalWalletState } from "../../common.js";
|
||||||
@ -244,7 +247,9 @@ export async function importBackup(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const tombstoneSet = new Set(backupBlob.tombstones);
|
const tombstoneSet = new Set(
|
||||||
|
(await tx.tombstones.iter().toArray()).map((x) => x.id),
|
||||||
|
);
|
||||||
|
|
||||||
// FIXME: Validate that the "details pointer" is correct
|
// FIXME: Validate that the "details pointer" is correct
|
||||||
|
|
||||||
@ -877,7 +882,7 @@ export async function importBackup(
|
|||||||
// importing things that are tombstoned,
|
// importing things that are tombstoned,
|
||||||
// but we do tombstone processing last just to be sure.
|
// but we do tombstone processing last just to be sure.
|
||||||
|
|
||||||
for (const tombstone of backupBlob.tombstones) {
|
for (const tombstone of tombstoneSet) {
|
||||||
const [type, ...rest] = tombstone.split(":");
|
const [type, ...rest] = tombstone.split(":");
|
||||||
if (type === TombstoneTag.DeleteDepositGroup) {
|
if (type === TombstoneTag.DeleteDepositGroup) {
|
||||||
await tx.depositGroups.delete(rest[0]);
|
await tx.depositGroups.delete(rest[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user