mainnet-js 2.1.0-alpha.5 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +0,0 @@
1
- export function indexedDbIsAvailable() {
2
- return "indexedDB" in globalThis;
3
- }
4
- //# sourceMappingURL=util.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../../../src/db/util.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,oBAAoB;IAClC,OAAO,WAAW,IAAI,UAAU,CAAC;AACnC,CAAC"}
@@ -1,19 +0,0 @@
1
- import { default as ExchangeRateProvider } from "./ExchangeRateProvider";
2
-
3
- test("Store and retrieve an exchange rate", async () => {
4
- let db = new ExchangeRateProvider();
5
- await db.init();
6
- let rate = 451.0;
7
- await db.setRate("usd", rate, Date.now());
8
- let fx1 = await db.getRate("usd");
9
- expect(fx1).toBeDefined();
10
- expect(fx1!.symbol).toBe("usd");
11
- expect(fx1!.rate).toBe(rate);
12
- let rate2 = 450.1;
13
- await db.setRate("usd", rate2, Date.now());
14
- let fx2 = await db.getRate("usd");
15
- expect(fx2).toBeDefined();
16
- expect(fx2!.symbol).toBe("usd");
17
- expect(fx2!.rate).toBe(rate2);
18
- await db.close();
19
- });
package/src/db/util.ts DELETED
@@ -1,3 +0,0 @@
1
- export function indexedDbIsAvailable() {
2
- return "indexedDB" in globalThis;
3
- }