commit ec031081eabb968456620332c1c6bfb84757978d
parent 661cdaf81473a75abf4bd4f4e9a9ec0e566dd5b4
Author: Florian Dold <florian@dold.me>
Date: Wed, 12 Aug 2026 13:08:27 +0200
update built-in exchanges with test
The test exchange is added to the list, but marked as a test exchange,
so it will not automatically become an exchange entry. Later, we can use
it to filter out withdrawal recommendations.
Diffstat:
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/packages/taler-wallet-core/src/preset-exchanges.ts b/packages/taler-wallet-core/src/preset-exchanges.ts
@@ -23,7 +23,7 @@ interface BuiltinExchange {
exchangeBaseUrl: string;
currencyHint: string;
currencySpec?: CurrencySpecification;
- type: "demo" | "prod";
+ type: "demo" | "prod" | "test";
versionAdded: number;
}
@@ -35,7 +35,7 @@ const logger = new Logger("preset-exchanges.ts");
/**
* Version of the defaults that ship with the code.
*/
-const currentDefaultsVersion = 3;
+const currentDefaultsVersion = 4;
/**
* Exchanges that ship with wallet-core.
@@ -48,6 +48,12 @@ const builtinExchanges: BuiltinExchange[] = [
versionAdded: 1,
},
{
+ exchangeBaseUrl: "https://exchange.test.taler.net/",
+ type: "test",
+ currencyHint: "KUDOS",
+ versionAdded: 1,
+ },
+ {
exchangeBaseUrl: "https://exchange.taler-ops.ch/",
currencyHint: "CHF",
type: "prod",
@@ -95,6 +101,11 @@ export async function fillDefaults(wex: WalletExecutionContext): Promise<void> {
if (exch.versionAdded <= appliedVersion) {
continue;
}
+ switch (exch.type) {
+ case "test":
+ // Don't even add!
+ continue;
+ }
await putPresetExchangeEntry(
tx,
exch.exchangeBaseUrl,