summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/wallet.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-09-06 18:35:43 +0200
committerFlorian Dold <florian@dold.me>2023-09-06 18:35:43 +0200
commitcd9c3a143bc1ad88ce77d53c212a90f60660069a (patch)
treea38d78af1e5bf96d666de09691b6418f9c295762 /packages/taler-wallet-core/src/wallet.ts
parent6affe04fe6919767181274891fd948688dedd700 (diff)
downloadwallet-core-cd9c3a143bc1ad88ce77d53c212a90f60660069a.tar.gz
wallet-core-cd9c3a143bc1ad88ce77d53c212a90f60660069a.tar.bz2
wallet-core-cd9c3a143bc1ad88ce77d53c212a90f60660069a.zip
remove deprecated auditor trust management
Diffstat (limited to 'packages/taler-wallet-core/src/wallet.ts')
-rw-r--r--packages/taler-wallet-core/src/wallet.ts39
1 files changed, 6 insertions, 33 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts
index 9a3b8f235..7a1bd5a4f 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -199,7 +199,6 @@ import {
downloadTosFromAcceptedFormat,
getExchangeDetails,
getExchangeRequestTimeout,
- getExchangeTrust,
provideExchangeRecordInTx,
updateExchangeFromUrl,
updateExchangeFromUrlHandler,
@@ -527,7 +526,7 @@ async function runTaskLoop(
*/
async function fillDefaults(ws: InternalWalletState): Promise<void> {
await ws.db
- .mktx((x) => [x.config, x.auditorTrust, x.exchanges, x.exchangeDetails])
+ .mktx((x) => [x.config, x.exchanges, x.exchangeDetails])
.runReadWrite(async (tx) => {
const appliedRec = await tx.config.get("currencyDefaultsApplied");
let alreadyApplied = appliedRec ? !!appliedRec.value : false;
@@ -535,10 +534,6 @@ async function fillDefaults(ws: InternalWalletState): Promise<void> {
logger.trace("defaults already applied");
return;
}
- logger.info("importing default exchanges and auditors");
- for (const c of ws.config.builtin.auditors) {
- await tx.auditorTrust.put(c);
- }
for (const baseUrl of ws.config.builtin.exchanges) {
await addPresetExchangeEntry(tx, baseUrl);
const now = AbsoluteTime.now();
@@ -1558,24 +1553,11 @@ async function dispatchRequestInternal<Op extends WalletApiOperation>(
return {};
}
case WalletApiOperation.ListCurrencies: {
- return await ws.db
- .mktx((x) => [x.auditorTrust, x.exchangeTrust])
- .runReadOnly(async (tx) => {
- const trustedAuditors = await tx.auditorTrust.iter().toArray();
- const trustedExchanges = await tx.exchangeTrust.iter().toArray();
- return {
- trustedAuditors: trustedAuditors.map((x) => ({
- currency: x.currency,
- auditorBaseUrl: x.auditorBaseUrl,
- auditorPub: x.auditorPub,
- })),
- trustedExchanges: trustedExchanges.map((x) => ({
- currency: x.currency,
- exchangeBaseUrl: x.exchangeBaseUrl,
- exchangeMasterPub: x.exchangeMasterPub,
- })),
- };
- });
+ // FIXME: Remove / change to scoped currency approach.
+ return {
+ trustedAuditors: [],
+ trustedExchanges: [],
+ };
}
case WalletApiOperation.WithdrawFakebank: {
const req = codecForWithdrawFakebankRequest().decode(payload);
@@ -1780,14 +1762,6 @@ export class Wallet {
public static defaultConfig: Readonly<WalletConfig> = {
builtin: {
exchanges: ["https://exchange.demo.taler.net/"],
- auditors: [
- {
- currency: "KUDOS",
- auditorPub: "BW9DC48PHQY4NH011SHHX36DZZ3Q22Y6X7FZ1VD1CMZ2PTFZ6PN0",
- auditorBaseUrl: "https://auditor.demo.taler.net/",
- uids: ["5P25XF8TVQP9AW6VYGY2KV47WT5Y3ZXFSJAA570GJPX5SVJXKBVG"],
- },
- ],
},
features: {
allowHttp: false,
@@ -1860,7 +1834,6 @@ class InternalWalletStateImpl implements InternalWalletState {
exchangeOps: ExchangeOperations = {
getExchangeDetails,
- getExchangeTrust,
updateExchangeFromUrl,
};