diff options
Diffstat (limited to 'packages/taler-util')
-rw-r--r-- | packages/taler-util/src/wallet-types.ts | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts index 06d76a6d4..5841b316e 100644 --- a/packages/taler-util/src/wallet-types.ts +++ b/packages/taler-util/src/wallet-types.ts @@ -2038,7 +2038,7 @@ export interface PreparePeerPushPaymentRequest { /** * Instructed amount. - * + * * FIXME: Allow specifying the instructed amount type. */ amount: AmountString; @@ -2092,7 +2092,14 @@ export interface CheckPeerPushPaymentResponse { export interface CheckPeerPullPaymentResponse { contractTerms: PeerContractTerms; + /** + * @deprecated Redundant field with bad name, will be removed soon. + */ amount: AmountString; + + amountRaw: AmountString; + amountEffective: AmountString; + peerPullPaymentIncomingId: string; } @@ -2161,25 +2168,23 @@ export const codecForAcceptPeerPullPaymentRequest = .build("AcceptPeerPllPaymentRequest"); export interface PreparePeerPullPaymentRequest { - exchangeBaseUrl: string; + exchangeBaseUrl?: string; amount: AmountString; } export const codecForPreparePeerPullPaymentRequest = (): Codec<PreparePeerPullPaymentRequest> => buildCodecForObject<PreparePeerPullPaymentRequest>() .property("amount", codecForAmountString()) - .property("exchangeBaseUrl", codecForString()) + .property("exchangeBaseUrl", codecOptional(codecForString())) .build("PreparePeerPullPaymentRequest"); export interface PreparePeerPullPaymentResponse { + exchangeBaseUrl: string; amountRaw: AmountString; amountEffective: AmountString; } export interface InitiatePeerPullPaymentRequest { - /** - * FIXME: Make this optional? - */ - exchangeBaseUrl: string; + exchangeBaseUrl?: string; partialContractTerms: PeerContractTerms; } @@ -2187,7 +2192,7 @@ export const codecForInitiatePeerPullPaymentRequest = (): Codec<InitiatePeerPullPaymentRequest> => buildCodecForObject<InitiatePeerPullPaymentRequest>() .property("partialContractTerms", codecForPeerContractTerms()) - .property("exchangeBaseUrl", codecForString()) + .property("exchangeBaseUrl", codecOptional(codecForString())) .build("InitiatePeerPullPaymentRequest"); export interface InitiatePeerPullPaymentResponse { |