diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/taler-wallet-core/src/exchanges.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/exchanges.ts b/packages/taler-wallet-core/src/exchanges.ts index dd4296d8a..335caff62 100644 --- a/packages/taler-wallet-core/src/exchanges.ts +++ b/packages/taler-wallet-core/src/exchanges.ts @@ -201,18 +201,26 @@ async function getExchangeRecordsInternal( ): Promise<ExchangeDetailsRecord | undefined> { const r = await tx.exchanges.get(exchangeBaseUrl); if (!r) { + logger.warn(`no exchange found for ${exchangeBaseUrl}`); return; } const dp = r.detailsPointer; if (!dp) { + logger.warn(`no exchange details pointer for ${exchangeBaseUrl}`); return; } const { currency, masterPublicKey } = dp; - return await tx.exchangeDetails.indexes.byPointer.get([ + const details = await tx.exchangeDetails.indexes.byPointer.get([ r.baseUrl, currency, masterPublicKey, ]); + if (!details) { + logger.warn( + `no exchange details with pointer ${j2s(dp)} for ${exchangeBaseUrl}`, + ); + } + return details; } export async function getExchangeScopeInfo( |