aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-util
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-09-06 17:17:44 -0300
committerSebastian <sebasjm@gmail.com>2022-09-06 17:17:50 -0300
commit1e00724a0dcd0d65e6d786a1d8d7cdffc9fe2a85 (patch)
tree34eb327ac3370174cec4365ecc375309462d239b /packages/taler-util
parent49c9279c1e06a90757b2bd3e75b4887e71345d1d (diff)
downloadwallet-core-1e00724a0dcd0d65e6d786a1d8d7cdffc9fe2a85.tar.xz
listExchangesDetailed to getExchangeDetailedInfo & ageRestriction taken from the denoms
Diffstat (limited to 'packages/taler-util')
-rw-r--r--packages/taler-util/src/transactionsTypes.ts1
-rw-r--r--packages/taler-util/src/walletTypes.ts24
2 files changed, 13 insertions, 12 deletions
diff --git a/packages/taler-util/src/transactionsTypes.ts b/packages/taler-util/src/transactionsTypes.ts
index e4b1faf2e..a46f304d1 100644
--- a/packages/taler-util/src/transactionsTypes.ts
+++ b/packages/taler-util/src/transactionsTypes.ts
@@ -190,7 +190,6 @@ export interface TransactionWithdrawal extends TransactionCommon {
export interface PeerInfoShort {
expiration: TalerProtocolTimestamp | undefined;
summary: string | undefined;
- completed: boolean;
}
/**
diff --git a/packages/taler-util/src/walletTypes.ts b/packages/taler-util/src/walletTypes.ts
index 095266f22..7ca56b4ff 100644
--- a/packages/taler-util/src/walletTypes.ts
+++ b/packages/taler-util/src/walletTypes.ts
@@ -568,12 +568,12 @@ export interface DepositInfo {
ageCommitmentProof?: AgeCommitmentProof;
}
-export interface ExchangesListRespose {
+export interface ExchangesListResponse {
exchanges: ExchangeListItem[];
}
-export interface ExchangeDetailledListRespose {
- exchanges: ExchangeFullDetailsListItem[];
+export interface ExchangeDetailedResponse {
+ exchange: ExchangeFullDetails;
}
export interface WalletCoreVersion {
@@ -733,7 +733,7 @@ export interface DenominationInfo {
stampExpireDeposit: TalerProtocolTimestamp;
}
-export interface ExchangeFullDetailsListItem {
+export interface ExchangeFullDetails {
exchangeBaseUrl: string;
currency: string;
paytoUris: string[];
@@ -771,9 +771,9 @@ const codecForExchangeTos = (): Codec<ExchangeTos> =>
.property("content", codecOptional(codecForString()))
.build("ExchangeTos");
-export const codecForExchangeFullDetailsListItem =
- (): Codec<ExchangeFullDetailsListItem> =>
- buildCodecForObject<ExchangeFullDetailsListItem>()
+export const codecForExchangeFullDetails =
+ (): Codec<ExchangeFullDetails> =>
+ buildCodecForObject<ExchangeFullDetails>()
.property("currency", codecForString())
.property("exchangeBaseUrl", codecForString())
.property("paytoUris", codecForList(codecForString()))
@@ -791,10 +791,10 @@ export const codecForExchangeListItem = (): Codec<ExchangeListItem> =>
.property("tos", codecForExchangeTos())
.build("ExchangeListItem");
-export const codecForExchangesListResponse = (): Codec<ExchangesListRespose> =>
- buildCodecForObject<ExchangesListRespose>()
- .property("exchanges", codecForList(codecForExchangeFullDetailsListItem()))
- .build("ExchangesListRespose");
+export const codecForExchangesListResponse = (): Codec<ExchangesListResponse> =>
+ buildCodecForObject<ExchangesListResponse>()
+ .property("exchanges", codecForList(codecForExchangeListItem()))
+ .build("ExchangesListResponse");
export interface AcceptManualWithdrawalResult {
/**
@@ -965,6 +965,7 @@ export const codecForGetWithdrawalDetailsForAmountRequest =
buildCodecForObject<GetWithdrawalDetailsForAmountRequest>()
.property("exchangeBaseUrl", codecForString())
.property("amount", codecForString())
+ .property("restrictAge", codecOptional(codecForNumber()))
.build("GetWithdrawalDetailsForAmountRequest");
export interface AcceptExchangeTosRequest {
@@ -1022,6 +1023,7 @@ export interface GetExchangeWithdrawalInfo {
exchangeBaseUrl: string;
amount: AmountJson;
tosAcceptedFormat?: string[];
+ ageRestricted?: number;
}
export const codecForGetExchangeWithdrawalInfo =