[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: fix tipping
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: fix tipping |
Date: |
Mon, 07 Mar 2022 20:44:22 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new 0323868e fix tipping
0323868e is described below
commit 0323868e10ca1fc5d3e10ad9e6866b986f552680
Author: Florian Dold <florian@dold.me>
AuthorDate: Mon Mar 7 20:44:18 2022 +0100
fix tipping
---
packages/taler-util/src/talerTypes.ts | 13 +------------
packages/taler-wallet-cli/src/harness/harness.ts | 8 +++++---
packages/taler-wallet-core/src/crypto/cryptoTypes.ts | 2 +-
.../src/crypto/workers/cryptoImplementation.ts | 11 ++++++++---
packages/taler-wallet-core/src/operations/tip.ts | 2 --
5 files changed, 15 insertions(+), 21 deletions(-)
diff --git a/packages/taler-util/src/talerTypes.ts
b/packages/taler-util/src/talerTypes.ts
index 4581f0b6..fa544aeb 100644
--- a/packages/taler-util/src/talerTypes.ts
+++ b/packages/taler-util/src/talerTypes.ts
@@ -609,7 +609,7 @@ export interface TipPlanchetDetail {
/**
* Coin's blinded public key.
*/
- coin_ev: string;
+ coin_ev: CoinEnvelope;
}
/**
@@ -1307,17 +1307,6 @@ export const codecForMerchantRefundResponse =
.property("refunds", codecForList(codecForMerchantRefundPermission()))
.build("MerchantRefundResponse");
-export const codecForMerchantBlindSigWrapperV1 =
- (): Codec<MerchantBlindSigWrapperV1> =>
- buildCodecForObject<MerchantBlindSigWrapperV1>()
- .property("blind_sig", codecForString())
- .build("BlindSigWrapper");
-
-export const codecForMerchantTipResponseV1 = (): Codec<MerchantTipResponseV1>
=>
- buildCodecForObject<MerchantTipResponseV1>()
- .property("blind_sigs", codecForList(codecForMerchantBlindSigWrapperV1()))
- .build("MerchantTipResponseV1");
-
export const codecForBlindSigWrapperV2 = (): Codec<MerchantBlindSigWrapperV2>
=>
buildCodecForObject<MerchantBlindSigWrapperV2>()
.property("blind_sig", codecForBlindedDenominationSignature())
diff --git a/packages/taler-wallet-cli/src/harness/harness.ts
b/packages/taler-wallet-cli/src/harness/harness.ts
index b24e828b..f4e42269 100644
--- a/packages/taler-wallet-cli/src/harness/harness.ts
+++ b/packages/taler-wallet-cli/src/harness/harness.ts
@@ -1894,9 +1894,11 @@ export class MerchantService implements
MerchantServiceInterface {
default_max_deposit_fee:
instanceConfig.defaultMaxDepositFee ??
`${this.merchantConfig.currency}:1.0`,
- default_wire_transfer_delay: instanceConfig.defaultWireTransferDelay ?? {
- d_ms: "forever",
- },
+ default_wire_transfer_delay:
+ instanceConfig.defaultWireTransferDelay ??
+ Duration.fromSpec({
+ days: 1,
+ }),
default_pay_delay: instanceConfig.defaultPayDelay ?? { d_ms: "forever" },
});
}
diff --git a/packages/taler-wallet-core/src/crypto/cryptoTypes.ts
b/packages/taler-wallet-core/src/crypto/cryptoTypes.ts
index 94abb8f7..00a7fba8 100644
--- a/packages/taler-wallet-core/src/crypto/cryptoTypes.ts
+++ b/packages/taler-wallet-core/src/crypto/cryptoTypes.ts
@@ -110,7 +110,7 @@ export interface DeriveTipRequest {
*/
export interface DerivedTipPlanchet {
blindingKey: string;
- coinEv: string;
+ coinEv: CoinEnvelope;
coinEvHash: string;
coinPriv: string;
coinPub: string;
diff --git
a/packages/taler-wallet-core/src/crypto/workers/cryptoImplementation.ts
b/packages/taler-wallet-core/src/crypto/workers/cryptoImplementation.ts
index f9cc63ec..d96e8305 100644
--- a/packages/taler-wallet-core/src/crypto/workers/cryptoImplementation.ts
+++ b/packages/taler-wallet-core/src/crypto/workers/cryptoImplementation.ts
@@ -229,11 +229,16 @@ export class CryptoImplementation {
const denomPub = decodeCrock(req.denomPub.rsa_public_key);
const coinPubHash = hash(fc.coinPub);
const ev = rsaBlind(coinPubHash, fc.bks, denomPub);
-
+ const coinEv = {
+ cipher: DenomKeyType.Rsa,
+ rsa_blinded_planchet: encodeCrock(ev),
+ };
const tipPlanchet: DerivedTipPlanchet = {
blindingKey: encodeCrock(fc.bks),
- coinEv: encodeCrock(ev),
- coinEvHash: encodeCrock(hash(ev)),
+ coinEv,
+ coinEvHash: encodeCrock(
+ hashCoinEv(coinEv, encodeCrock(hashDenomPub(req.denomPub))),
+ ),
coinPriv: encodeCrock(fc.coinPriv),
coinPub: encodeCrock(fc.coinPub),
};
diff --git a/packages/taler-wallet-core/src/operations/tip.ts
b/packages/taler-wallet-core/src/operations/tip.ts
index 039fb64a..cc2d71ef 100644
--- a/packages/taler-wallet-core/src/operations/tip.ts
+++ b/packages/taler-wallet-core/src/operations/tip.ts
@@ -27,13 +27,11 @@ import {
NotificationType,
TipPlanchetDetail,
TalerErrorCode,
- codecForMerchantTipResponseV1,
Logger,
URL,
DenomKeyType,
BlindedDenominationSignature,
codecForMerchantTipResponseV2,
- MerchantProtocolVersion,
} from "@gnu-taler/taler-util";
import { DerivedTipPlanchet } from "../crypto/cryptoTypes.js";
import {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: fix tipping,
gnunet <=