summaryrefslogtreecommitdiff
path: root/src/crypto/workers
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/workers')
-rw-r--r--src/crypto/workers/cryptoApi.ts4
-rw-r--r--src/crypto/workers/cryptoImplementation.ts12
2 files changed, 8 insertions, 8 deletions
diff --git a/src/crypto/workers/cryptoApi.ts b/src/crypto/workers/cryptoApi.ts
index ab97e1274..d3b12e26d 100644
--- a/src/crypto/workers/cryptoApi.ts
+++ b/src/crypto/workers/cryptoApi.ts
@@ -359,8 +359,8 @@ export class CryptoApi {
return this.doRpc<string>("hashString", 1, str);
}
- hashDenomPub(denomPub: string): Promise<string> {
- return this.doRpc<string>("hashDenomPub", 1, denomPub);
+ hashEncoded(encodedBytes: string): Promise<string> {
+ return this.doRpc<string>("hashEncoded", 1, encodedBytes);
}
isValidDenom(denom: DenominationRecord, masterPub: string): Promise<boolean> {
diff --git a/src/crypto/workers/cryptoImplementation.ts b/src/crypto/workers/cryptoImplementation.ts
index 156c72ba0..eef8f5955 100644
--- a/src/crypto/workers/cryptoImplementation.ts
+++ b/src/crypto/workers/cryptoImplementation.ts
@@ -49,8 +49,7 @@ import {
PlanchetCreationRequest,
DepositInfo,
} from "../../types/walletTypes";
-import { AmountJson } from "../../util/amounts";
-import * as Amounts from "../../util/amounts";
+import { AmountJson, Amounts } from "../../util/amounts";
import * as timer from "../../util/timer";
import {
encodeCrock,
@@ -199,6 +198,7 @@ export class CryptoImplementation {
denomPubHash: encodeCrock(denomPubHash),
reservePub: encodeCrock(reservePub),
withdrawSig: encodeCrock(sig),
+ coinEvHash: encodeCrock(evHash),
};
return planchet;
}
@@ -367,7 +367,7 @@ export class CryptoImplementation {
const s: CoinDepositPermission = {
coin_pub: depositInfo.coinPub,
coin_sig: encodeCrock(coinSig),
- contribution: Amounts.toString(depositInfo.spendAmount),
+ contribution: Amounts.stringify(depositInfo.spendAmount),
denom_pub: depositInfo.denomPub,
exchange_url: depositInfo.exchangeBaseUrl,
ub_sig: depositInfo.denomSig,
@@ -491,10 +491,10 @@ export class CryptoImplementation {
}
/**
- * Hash a denomination public key.
+ * Hash a crockford encoded value.
*/
- hashDenomPub(denomPub: string): string {
- return encodeCrock(hash(decodeCrock(denomPub)));
+ hashEncoded(encodedBytes: string): string {
+ return encodeCrock(hash(decodeCrock(encodedBytes)));
}
signCoinLink(