diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-12-12 20:53:15 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-12-12 20:53:15 +0100 |
commit | 74433c3e05734aa1194049fcbcaa92c70ce61c74 (patch) | |
tree | d30e79c9ac3fd5720de628f6a9764354ec69c648 /src/webex/wxBackend.ts | |
parent | cc137c87394ec34d2f54d69fe896dfdf3feec5ea (diff) |
refactor: re-structure type definitions
Diffstat (limited to 'src/webex/wxBackend.ts')
-rw-r--r-- | src/webex/wxBackend.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/webex/wxBackend.ts b/src/webex/wxBackend.ts index 27141247e..f3f4d80eb 100644 --- a/src/webex/wxBackend.ts +++ b/src/webex/wxBackend.ts @@ -30,11 +30,11 @@ import { CreateReserveRequest, ReturnCoinsRequest, WalletDiagnostics, -} from "../walletTypes"; +} from "../types/walletTypes"; import { Wallet } from "../wallet"; import { isFirefox } from "./compat"; -import { WALLET_DB_VERSION } from "../dbTypes"; -import { openTalerDb, exportDb, importDb, deleteDb } from "../db"; +import { WALLET_DB_VERSION } from "../types/dbTypes"; +import { openDatabase, exportDatabase, importDatabase, deleteDatabase } from "../db"; import { ChromeBadge } from "./chromeBadge"; import { MessageType } from "./messages"; import * as wxApi from "./wxApi"; @@ -73,11 +73,11 @@ async function handleMessage( } case "dump-db": { const db = needsWallet().db; - return exportDb(db); + return exportDatabase(db); } case "import-db": { const db = needsWallet().db; - return importDb(db, detail.dump); + return importDatabase(db, detail.dump); } case "ping": { return Promise.resolve(); @@ -91,7 +91,7 @@ async function handleMessage( tx.objectStore(db.objectStoreNames[i]).clear(); } } - deleteDb(indexedDB); + deleteDatabase(indexedDB); setBadgeText({ text: "" }); console.log("reset done"); if (!currentWallet) { @@ -423,7 +423,7 @@ async function reinitWallet() { setBadgeText({ text: "" }); const badge = new ChromeBadge(); try { - currentDatabase = await openTalerDb( + currentDatabase = await openDatabase( indexedDB, reinitWallet, handleUpgradeUnsupported, |