diff options
Diffstat (limited to 'packages/taler-wallet-core/src/operations/common.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/common.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/operations/common.ts b/packages/taler-wallet-core/src/operations/common.ts index b28a5363d..6ab6a54d9 100644 --- a/packages/taler-wallet-core/src/operations/common.ts +++ b/packages/taler-wallet-core/src/operations/common.ts @@ -37,6 +37,8 @@ import { NotificationType, OperationErrorInfo, RefreshReason, + ScopeInfo, + ScopeType, TalerError, TalerErrorCode, TalerErrorDetail, @@ -591,6 +593,16 @@ export function makeExchangeListItem( break; } + let scopeInfo: ScopeInfo | undefined = undefined; + if (exchangeDetails) { + // FIXME: Look up actual scope info. + scopeInfo = { + currency: exchangeDetails.currency, + type: ScopeType.Exchange, + url: r.baseUrl, + }; + } + return { exchangeBaseUrl: r.baseUrl, currency: exchangeDetails?.currency ?? r.presetCurrencyHint, @@ -604,6 +616,7 @@ export function makeExchangeListItem( : [], paytoUris: exchangeDetails?.wireInfo.accounts.map((x) => x.payto_uri) ?? [], lastUpdateErrorInfo, + scopeInfo, }; } |