diff options
author | Florian Dold <florian@dold.me> | 2024-05-15 23:47:00 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-05-15 23:47:00 +0200 |
commit | ca3234b53f8d28ff9cc41af68a0057eaecf69df2 (patch) | |
tree | 4f35eef59ed65a0b4daf4dcae5876b1d008b4e30 /packages/taler-wallet-core | |
parent | 6529421a5c09dec082f33ea80b1df2861e0bf5c9 (diff) | |
download | wallet-core-ca3234b53f8d28ff9cc41af68a0057eaecf69df2.tar.xz |
wallet-core: phase out support for public key in taler://withdraw-exchange URI
Diffstat (limited to 'packages/taler-wallet-core')
-rw-r--r-- | packages/taler-wallet-core/src/exchanges.ts | 2 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/wallet.ts | 7 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/withdraw.ts | 4 |
3 files changed, 2 insertions, 11 deletions
diff --git a/packages/taler-wallet-core/src/exchanges.ts b/packages/taler-wallet-core/src/exchanges.ts index 6262ae4d3..d8063d561 100644 --- a/packages/taler-wallet-core/src/exchanges.ts +++ b/packages/taler-wallet-core/src/exchanges.ts @@ -1152,9 +1152,7 @@ export async function fetchFreshExchange( wex: WalletExecutionContext, baseUrl: string, options: { - cancellationToken?: CancellationToken; forceUpdate?: boolean; - expectedMasterPub?: string; } = {}, ): Promise<ReadyExchangeSummary> { if (!options.forceUpdate) { diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index fe03dbf62..b8ef4976d 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -660,9 +660,6 @@ async function handlePrepareWithdrawExchange( } const exchangeBaseUrl = parsedUri.exchangeBaseUrl; const exchange = await fetchFreshExchange(wex, exchangeBaseUrl); - if (parsedUri.exchangePub && exchange.masterPub != parsedUri.exchangePub) { - throw Error("mismatch of exchange master public key (URI vs actual)"); - } if (parsedUri.amount) { const amt = Amounts.parseOrThrow(parsedUri.amount); if (amt.currency !== exchange.currency) { @@ -822,9 +819,7 @@ async function dispatchRequestInternal( } case WalletApiOperation.AddExchange: { const req = codecForAddExchangeRequest().decode(payload); - await fetchFreshExchange(wex, req.exchangeBaseUrl, { - expectedMasterPub: req.masterPub, - }); + await fetchFreshExchange(wex, req.exchangeBaseUrl, {}); return {}; } case WalletApiOperation.TestingPing: { diff --git a/packages/taler-wallet-core/src/withdraw.ts b/packages/taler-wallet-core/src/withdraw.ts index 43256d3fe..0eb9a3dfe 100644 --- a/packages/taler-wallet-core/src/withdraw.ts +++ b/packages/taler-wallet-core/src/withdraw.ts @@ -2078,9 +2078,7 @@ export async function getExchangeWithdrawalInfo( ageRestricted: number | undefined, ): Promise<ExchangeWithdrawalDetails> { logger.trace("updating exchange"); - const exchange = await fetchFreshExchange(wex, exchangeBaseUrl, { - cancellationToken: wex.cancellationToken, - }); + const exchange = await fetchFreshExchange(wex, exchangeBaseUrl, {}); wex.cancellationToken.throwIfCancelled(); |