aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/refresh.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-03-23 21:24:23 +0100
committerFlorian Dold <florian@dold.me>2022-03-23 21:24:36 +0100
commitd881f4fd258a27cc765a25c24e5fef9f86b6226f (patch)
tree3254444f93ef552f4ac65f14e581ed761b9df79e /packages/taler-wallet-core/src/operations/refresh.ts
parente21c1b31928cd6bfe90150ea2de19799b6359c40 (diff)
downloadwallet-core-d881f4fd258a27cc765a25c24e5fef9f86b6226f.tar.xz
wallet: simplify crypto workers
Diffstat (limited to 'packages/taler-wallet-core/src/operations/refresh.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/refresh.ts22
1 files changed, 11 insertions, 11 deletions
diff --git a/packages/taler-wallet-core/src/operations/refresh.ts b/packages/taler-wallet-core/src/operations/refresh.ts
index c422674a9..a77738262 100644
--- a/packages/taler-wallet-core/src/operations/refresh.ts
+++ b/packages/taler-wallet-core/src/operations/refresh.ts
@@ -76,9 +76,9 @@ import {
RefreshNewDenomInfo,
} from "../crypto/cryptoTypes.js";
import { GetReadWriteAccess } from "../util/query.js";
-import { CryptoApi } from "../index.browser.js";
import { guardOperationException } from "./common.js";
-import { CryptoApiStoppedError } from "../crypto/workers/cryptoApi.js";
+import { CryptoApiStoppedError } from "../crypto/workers/cryptoDispatcher.js";
+import { TalerCryptoInterface } from "../crypto/cryptoImplementation.js";
const logger = new Logger("refresh.ts");
@@ -461,7 +461,7 @@ async function refreshMelt(
}
export async function assembleRefreshRevealRequest(args: {
- cryptoApi: CryptoApi;
+ cryptoApi: TalerCryptoInterface;
derived: DerivedRefreshSession;
norevealIndex: number;
oldCoinPub: CoinPublicKeyString;
@@ -494,14 +494,14 @@ export async function assembleRefreshRevealRequest(args: {
const dsel = newDenoms[i];
for (let j = 0; j < dsel.count; j++) {
const newCoinIndex = linkSigs.length;
- const linkSig = await cryptoApi.signCoinLink(
- oldCoinPriv,
- dsel.denomPubHash,
- oldCoinPub,
- derived.transferPubs[norevealIndex],
- planchets[newCoinIndex].coinEv,
- );
- linkSigs.push(linkSig);
+ const linkSig = await cryptoApi.signCoinLink({
+ coinEv: planchets[newCoinIndex].coinEv,
+ newDenomHash: dsel.denomPubHash,
+ oldCoinPriv: oldCoinPriv,
+ oldCoinPub: oldCoinPub,
+ transferPub: derived.transferPubs[norevealIndex],
+ });
+ linkSigs.push(linkSig.sig);
newDenomsFlat.push(dsel.denomPubHash);
}
}