This commit is contained in:
Florian Dold 2022-11-01 15:36:10 +01:00
parent d63a773bf5
commit ab48d3df6e
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
2 changed files with 4 additions and 4 deletions

View File

@ -919,7 +919,7 @@ export interface ExchangeListItem {
paytoUris: string[];
tosStatus: ExchangeTosStatus;
exchangeStatus: ExchangeEntryStatus;
supportedAgeGroups: number[];
ageRestrictionOptions: number[];
/**
* Permanently added to the wallet, as opposed to just
* temporarily queried.
@ -999,7 +999,7 @@ export const codecForExchangeListItem = (): Codec<ExchangeListItem> =>
.property("tosStatus", codecForAny())
.property("exchangeStatus", codecForAny())
.property("permanent", codecForBoolean())
.property("supportedAgeGroups", codecForList(codecForNumber()))
.property("ageRestrictionOptions", codecForList(codecForNumber()))
.build("ExchangeListItem");
export const codecForExchangesListResponse = (): Codec<ExchangesListResponse> =>

View File

@ -366,7 +366,7 @@ export function makeExchangeListItem(
paytoUris: [],
exchangeStatus: ExchangeEntryStatus.Unknown,
permanent: r.permanent,
supportedAgeGroups: [],
ageRestrictionOptions: [],
};
}
let exchangeStatus;
@ -378,7 +378,7 @@ export function makeExchangeListItem(
paytoUris: exchangeDetails.wireInfo.accounts.map((x) => x.payto_uri),
exchangeStatus,
permanent: r.permanent,
supportedAgeGroups: exchangeDetails.ageMask
ageRestrictionOptions: exchangeDetails.ageMask
? AgeRestriction.getAgeGroupsFromMask(exchangeDetails.ageMask)
: [],
};