diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-03-30 16:09:32 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-03-30 16:09:32 +0530 |
commit | aaf950e2ad5c07d4423f9822e3a0ae9f7b8d2bdf (patch) | |
tree | 9274139660f30c4857d80044eb4ac283aac1775a /src/crypto/workers | |
parent | 15e18440dbad55df19977a2eb7053681259afc18 (diff) | |
download | wallet-core-aaf950e2ad5c07d4423f9822e3a0ae9f7b8d2bdf.tar.xz |
re-format with prettier v2, fix HTML
Diffstat (limited to 'src/crypto/workers')
-rw-r--r-- | src/crypto/workers/cryptoApi.ts | 5 | ||||
-rw-r--r-- | src/crypto/workers/cryptoImplementation.ts | 8 | ||||
-rw-r--r-- | src/crypto/workers/cryptoWorker.ts | 2 | ||||
-rw-r--r-- | src/crypto/workers/nodeThreadWorker.ts | 2 | ||||
-rw-r--r-- | src/crypto/workers/synchronousWorker.ts | 4 |
5 files changed, 9 insertions, 12 deletions
diff --git a/src/crypto/workers/cryptoApi.ts b/src/crypto/workers/cryptoApi.ts index 0b7c2e233..ab97e1274 100644 --- a/src/crypto/workers/cryptoApi.ts +++ b/src/crypto/workers/cryptoApi.ts @@ -281,8 +281,9 @@ export class CryptoApi { CryptoApi.enableTracing && console.log( - `rpc ${currentWorkItem.operation} took ${timer.performanceNow() - - currentWorkItem.startTime}ms`, + `rpc ${currentWorkItem.operation} took ${ + timer.performanceNow() - currentWorkItem.startTime + }ms`, ); currentWorkItem.resolve(msg.data.result); } diff --git a/src/crypto/workers/cryptoImplementation.ts b/src/crypto/workers/cryptoImplementation.ts index 55caecb43..156c72ba0 100644 --- a/src/crypto/workers/cryptoImplementation.ts +++ b/src/crypto/workers/cryptoImplementation.ts @@ -313,9 +313,7 @@ export class CryptoImplementation { stringToBytes(paytoUri + "\0"), new Uint8Array(0), ); - const p = buildSigPS(SignaturePurpose.MASTER_WIRE_DETAILS) - .put(h) - .build(); + const p = buildSigPS(SignaturePurpose.MASTER_WIRE_DETAILS).put(h).build(); return eddsaVerify(p, decodeCrock(sig), decodeCrock(masterPub)); } @@ -467,8 +465,8 @@ export class CryptoImplementation { exchangeBaseUrl, hash: encodeCrock(sessionHash), meltCoinPub: meltCoin.coinPub, - newDenomHashes: newCoinDenoms.map(d => d.denomPubHash), - newDenoms: newCoinDenoms.map(d => d.denomPub), + newDenomHashes: newCoinDenoms.map((d) => d.denomPubHash), + newDenoms: newCoinDenoms.map((d) => d.denomPub), norevealIndex: undefined, planchetsForGammas: planchetsForGammas, transferPrivs, diff --git a/src/crypto/workers/cryptoWorker.ts b/src/crypto/workers/cryptoWorker.ts index d4449f4a2..9f3ee6f50 100644 --- a/src/crypto/workers/cryptoWorker.ts +++ b/src/crypto/workers/cryptoWorker.ts @@ -5,4 +5,4 @@ export interface CryptoWorker { onmessage: ((m: any) => void) | undefined; onerror: ((m: any) => void) | undefined; -}
\ No newline at end of file +} diff --git a/src/crypto/workers/nodeThreadWorker.ts b/src/crypto/workers/nodeThreadWorker.ts index e40f3c950..1247900f9 100644 --- a/src/crypto/workers/nodeThreadWorker.ts +++ b/src/crypto/workers/nodeThreadWorker.ts @@ -96,7 +96,7 @@ export function handleWorkerMessage(msg: any) { } }; - handleRequest().catch(e => { + handleRequest().catch((e) => { console.error("error in node worker", e); }); } diff --git a/src/crypto/workers/synchronousWorker.ts b/src/crypto/workers/synchronousWorker.ts index 12eecde9a..b453468d5 100644 --- a/src/crypto/workers/synchronousWorker.ts +++ b/src/crypto/workers/synchronousWorker.ts @@ -37,12 +37,10 @@ export class SynchronousCryptoWorkerFactory implements CryptoWorkerFactory { } } - /** * Worker implementation that uses node subprocesses. */ export class SynchronousCryptoWorker { - /** * Function to be called when we receive a message from the worker thread. */ @@ -121,7 +119,7 @@ export class SynchronousCryptoWorker { return; } - this.handleRequest(operation, id, args).catch(e => { + this.handleRequest(operation, id, args).catch((e) => { console.error("Error while handling crypto request:", e); }); } |