From dab739a63e032fcf26674dc1bf56533b00c45b6b Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 1 Nov 2022 11:34:20 +0100 Subject: wallet-core: use PeerContractTerms --- packages/taler-util/src/taler-types.ts | 7 ++++--- packages/taler-util/src/wallet-types.ts | 10 +++++----- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'packages/taler-util') diff --git a/packages/taler-util/src/taler-types.ts b/packages/taler-util/src/taler-types.ts index e6223ca76..134f59836 100644 --- a/packages/taler-util/src/taler-types.ts +++ b/packages/taler-util/src/taler-types.ts @@ -413,8 +413,9 @@ export interface InternationalizedString { /** * Contract terms from a merchant. + * FIXME: Add type field! */ -export interface ContractTerms { +export interface MerchantContractTerms { /** * Hash of the merchant's wire details. */ @@ -1310,8 +1311,8 @@ export const codecForProduct = (): Codec => .property("price", codecOptional(codecForString())) .build("Tax"); -export const codecForContractTerms = (): Codec => - buildCodecForObject() +export const codecForContractTerms = (): Codec => + buildCodecForObject() .property("order_id", codecForString()) .property("fulfillment_url", codecOptional(codecForString())) .property("fulfillment_message", codecOptional(codecForString())) diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts index 614610bb1..fc69fd9cb 100644 --- a/packages/taler-util/src/wallet-types.ts +++ b/packages/taler-util/src/wallet-types.ts @@ -55,7 +55,7 @@ import { AuditorDenomSig, codecForContractTerms, CoinEnvelope, - ContractTerms, + MerchantContractTerms, DenominationPubKey, DenomKeyType, ExchangeAuditor, @@ -229,7 +229,7 @@ export enum ConfirmPayResultType { */ export interface ConfirmPayResultDone { type: ConfirmPayResultType.Done; - contractTerms: ContractTerms; + contractTerms: MerchantContractTerms; transactionId: string; } @@ -529,7 +529,7 @@ export type PreparePayResult = export interface PreparePayResultPaymentPossible { status: PreparePayResultType.PaymentPossible; proposalId: string; - contractTerms: ContractTerms; + contractTerms: MerchantContractTerms; contractTermsHash: string; amountRaw: string; amountEffective: string; @@ -539,14 +539,14 @@ export interface PreparePayResultPaymentPossible { export interface PreparePayResultInsufficientBalance { status: PreparePayResultType.InsufficientBalance; proposalId: string; - contractTerms: ContractTerms; + contractTerms: MerchantContractTerms; amountRaw: string; noncePriv: string; } export interface PreparePayResultAlreadyConfirmed { status: PreparePayResultType.AlreadyConfirmed; - contractTerms: ContractTerms; + contractTerms: MerchantContractTerms; paid: boolean; amountRaw: string; amountEffective: string; -- cgit v1.2.3