diff options
author | Florian Dold <florian@dold.me> | 2024-06-16 17:47:29 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-06-16 17:47:36 +0200 |
commit | 65f168b4d259603cb9321f19228507875da87038 (patch) | |
tree | fd80e86a4bcbe89ef7739ed68f16ce8042fa9905 /packages/taler-wallet-core | |
parent | 1e2d09017fd5bd0a8b5def8a30f5a7c07e8a7156 (diff) | |
download | wallet-core-65f168b4d259603cb9321f19228507875da87038.tar.xz |
wallet-core: fix return value of getExchangeTos for missing ToS
Diffstat (limited to 'packages/taler-wallet-core')
-rw-r--r-- | packages/taler-wallet-core/src/exchanges.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/exchanges.ts b/packages/taler-wallet-core/src/exchanges.ts index dd88fa836..903f79dcd 100644 --- a/packages/taler-wallet-core/src/exchanges.ts +++ b/packages/taler-wallet-core/src/exchanges.ts @@ -2122,6 +2122,19 @@ export async function getExchangeTos( ): Promise<GetExchangeTosResult> { const exch = await fetchFreshExchange(wex, exchangeBaseUrl); + switch (exch.tosStatus) { + case ExchangeTosStatus.MissingTos: + return { + tosStatus: ExchangeTosStatus.MissingTos, + acceptedEtag: undefined, + contentLanguage: undefined, + contentType: "text/plain", + content: "NULL", + currentEtag: "NULL", + tosAvailableLanguages: [], + }; + } + const tosDownload = await downloadTosFromAcceptedFormat( wex, exchangeBaseUrl, |