diff options
author | Florian Dold <florian@dold.me> | 2024-01-09 16:23:26 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-01-09 16:23:26 +0100 |
commit | f8cde03f0cb6a7584fb92885f8979a01916a917d (patch) | |
tree | 6f120387f8f5297f436e2d2bd2d4d7b5c1814146 /packages/taler-wallet-core/src/operations/refresh.ts | |
parent | de39d432374a3ecd1bddd788b1ac1585461af8c1 (diff) | |
download | wallet-core-f8cde03f0cb6a7584fb92885f8979a01916a917d.tar.xz |
wallet-core: refactor peer-pull-debit and test aborting
Diffstat (limited to 'packages/taler-wallet-core/src/operations/refresh.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/refresh.ts | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/packages/taler-wallet-core/src/operations/refresh.ts b/packages/taler-wallet-core/src/operations/refresh.ts index 17ac54cfb..a8bcb28d1 100644 --- a/packages/taler-wallet-core/src/operations/refresh.ts +++ b/packages/taler-wallet-core/src/operations/refresh.ts @@ -84,6 +84,7 @@ import { RefreshSessionRecord, timestampPreciseToDb, timestampProtocolFromDb, + WalletDbReadWriteTransaction, } from "../index.js"; import { EXCHANGE_COINS_LOCK, @@ -92,7 +93,11 @@ import { import { assertUnreachable } from "../util/assertUnreachable.js"; import { selectWithdrawalDenominations } from "../util/coinSelection.js"; import { checkDbInvariant } from "../util/invariants.js"; -import { GetReadOnlyAccess, GetReadWriteAccess } from "../util/query.js"; +import { + DbReadWriteTransaction, + GetReadOnlyAccess, + GetReadWriteAccess, +} from "../util/query.js"; import { constructTaskIdentifier, makeCoinAvailable, @@ -1097,12 +1102,9 @@ async function applyRefresh( */ export async function createRefreshGroup( ws: InternalWalletState, - tx: GetReadWriteAccess<{ - denominations: typeof WalletStoresV1.denominations; - coins: typeof WalletStoresV1.coins; - refreshGroups: typeof WalletStoresV1.refreshGroups; - coinAvailability: typeof WalletStoresV1.coinAvailability; - }>, + tx: WalletDbReadWriteTransaction< + "denominations" | "coins" | "refreshGroups" | "coinAvailability" + >, currency: string, oldCoinPubs: CoinRefreshRequest[], reason: RefreshReason, |