diff options
author | Florian Dold <florian@dold.me> | 2022-09-16 16:20:47 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-09-16 16:32:21 +0200 |
commit | b91caf977fad8da11e523ca3a39064dd86e04c64 (patch) | |
tree | 732e1543d2555094d7f9a9ca242309847c1a33a3 /packages/taler-wallet-core/src/operations/peer-to-peer.ts | |
parent | 2747bc260bc05418974570d04d7f999dfc988cda (diff) | |
download | wallet-core-b91caf977fad8da11e523ca3a39064dd86e04c64.tar.xz |
wallet-core: support age restrictions in new coin selection
Diffstat (limited to 'packages/taler-wallet-core/src/operations/peer-to-peer.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/peer-to-peer.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/operations/peer-to-peer.ts b/packages/taler-wallet-core/src/operations/peer-to-peer.ts index e71e8a709..ffbc1fc97 100644 --- a/packages/taler-wallet-core/src/operations/peer-to-peer.ts +++ b/packages/taler-wallet-core/src/operations/peer-to-peer.ts @@ -118,7 +118,8 @@ interface CoinInfo { denomSig: UnblindedSignature; - ageCommitmentProof: AgeCommitmentProof | undefined; + maxAge: number; + ageCommitmentProof?: AgeCommitmentProof; } export async function selectPeerCoins( @@ -156,6 +157,7 @@ export async function selectPeerCoins( denomPubHash: denom.denomPubHash, coinPriv: coin.coinPriv, denomSig: coin.denomSig, + maxAge: coin.maxAge, ageCommitmentProof: coin.ageCommitmentProof, }); } @@ -245,6 +247,7 @@ export async function initiatePeerToPeerPush( .mktx((x) => [ x.exchanges, x.coins, + x.coinAvailability, x.denominations, x.refreshGroups, x.peerPullPaymentInitiations, @@ -583,6 +586,7 @@ export async function acceptPeerPullPayment( x.denominations, x.refreshGroups, x.peerPullPaymentIncoming, + x.coinAvailability, ]) .runReadWrite(async (tx) => { const sel = await selectPeerCoins(ws, tx, instructedAmount); |