diff options
author | Sebastian <sebasjm@gmail.com> | 2023-10-22 14:47:50 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-10-22 14:47:50 -0300 |
commit | 5e160a2d4d1d77c87600f28f806bc94c086267c7 (patch) | |
tree | ec8475a39d7aa4565b490e259d787b195fb98bb3 /packages/taler-util/src/wallet-types.ts | |
parent | 2005273d1286819e68d3ea7a3290f8c357be5e40 (diff) | |
download | wallet-core-5e160a2d4d1d77c87600f28f806bc94c086267c7.tar.xz |
update the amountString definitionv0.9.3-dev.34
Diffstat (limited to 'packages/taler-util/src/wallet-types.ts')
-rw-r--r-- | packages/taler-util/src/wallet-types.ts | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts index 11567b624..7503a4665 100644 --- a/packages/taler-util/src/wallet-types.ts +++ b/packages/taler-util/src/wallet-types.ts @@ -559,7 +559,7 @@ export interface CoinDumpJson { spend_allocation: | { id: string; - amount: string; + amount: AmountString; } | undefined; /** @@ -890,8 +890,8 @@ export interface PreparePayResultPaymentPossible { proposalId: string; contractTerms: MerchantContractTerms; contractTermsHash: string; - amountRaw: string; - amountEffective: string; + amountRaw: AmountString; + amountEffective: AmountString; talerUri: string; } @@ -903,7 +903,7 @@ export interface PreparePayResultInsufficientBalance { */ proposalId: string; contractTerms: MerchantContractTerms; - amountRaw: string; + amountRaw: AmountString; talerUri: string; balanceDetails: PayMerchantInsufficientBalanceDetails; } @@ -913,8 +913,8 @@ export interface PreparePayResultAlreadyConfirmed { transactionId: TransactionIdStr; contractTerms: MerchantContractTerms; paid: boolean; - amountRaw: string; - amountEffective: string | undefined; + amountRaw: AmountString; + amountEffective: AmountString | undefined; contractTermsHash: string; /** * @deprecated use transactionId @@ -1553,7 +1553,7 @@ export interface GetExchangeTosResult { export interface TestPayArgs { merchantBaseUrl: string; merchantAuthToken?: string; - amount: string; + amount: AmountString; summary: string; forcedCoinSel?: ForcedCoinSel; } @@ -1562,7 +1562,7 @@ export const codecForTestPayArgs = (): Codec<TestPayArgs> => buildCodecForObject<TestPayArgs>() .property("merchantBaseUrl", codecForString()) .property("merchantAuthToken", codecOptional(codecForString())) - .property("amount", codecForString()) + .property("amount", codecForAmountString()) .property("summary", codecForString()) .property("forcedCoinSel", codecForAny()) .build("TestPayArgs"); @@ -1572,8 +1572,8 @@ export interface IntegrationTestArgs { corebankApiBaseUrl: string; merchantBaseUrl: string; merchantAuthToken?: string; - amountToWithdraw: string; - amountToSpend: string; + amountToWithdraw: AmountString; + amountToSpend: AmountString; } export const codecForIntegrationTestArgs = (): Codec<IntegrationTestArgs> => @@ -1647,7 +1647,7 @@ export const codecForGetExchangeTosRequest = (): Codec<GetExchangeTosRequest> => export interface AcceptManualWithdrawalRequest { exchangeBaseUrl: string; - amount: string; + amount: AmountString; restrictAge?: number; } @@ -1655,13 +1655,13 @@ export const codecForAcceptManualWithdrawalRequet = (): Codec<AcceptManualWithdrawalRequest> => buildCodecForObject<AcceptManualWithdrawalRequest>() .property("exchangeBaseUrl", codecForString()) - .property("amount", codecForString()) + .property("amount", codecForAmountString()) .property("restrictAge", codecOptional(codecForNumber())) .build("AcceptManualWithdrawalRequest"); export interface GetWithdrawalDetailsForAmountRequest { exchangeBaseUrl: string; - amount: string; + amount: AmountString; restrictAge?: number; } @@ -1685,7 +1685,7 @@ export const codecForGetWithdrawalDetailsForAmountRequest = (): Codec<GetWithdrawalDetailsForAmountRequest> => buildCodecForObject<GetWithdrawalDetailsForAmountRequest>() .property("exchangeBaseUrl", codecForString()) - .property("amount", codecForString()) + .property("amount", codecForAmountString()) .property("restrictAge", codecOptional(codecForNumber())) .build("GetWithdrawalDetailsForAmountRequest"); @@ -1873,7 +1873,7 @@ export interface CoreApiResponseError { } export interface WithdrawTestBalanceRequest { - amount: string; + amount: AmountString; /** * Corebank API base URL. */ @@ -1947,7 +1947,7 @@ export interface RecoveryLoadRequest { export const codecForWithdrawTestBalance = (): Codec<WithdrawTestBalanceRequest> => buildCodecForObject<WithdrawTestBalanceRequest>() - .property("amount", codecForString()) + .property("amount", codecForAmountString()) .property("exchangeBaseUrl", codecForString()) .property("forcedDenomSel", codecForAny()) .property("corebankApiBaseUrl", codecForString()) |