diff options
author | Florian Dold <florian@dold.me> | 2023-02-19 23:13:44 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-02-19 23:13:44 +0100 |
commit | e6ed901626a5219a1d091f4f41654365d2c29531 (patch) | |
tree | 1dfb2fbc7615ebe6e91621b901bf90968bd98edf /packages/taler-util/src | |
parent | 925ef1f410e01323ee24ab9019afcc1713bf07c2 (diff) | |
download | wallet-core-e6ed901626a5219a1d091f4f41654365d2c29531.tar.xz |
wallet-core: various p2p payment fixes
Diffstat (limited to 'packages/taler-util/src')
-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 { |