@talismn/token-rates 0.0.0-pr563-20230222052739 → 0.0.0-pr573-20230227134247

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.
package/CHANGELOG.md CHANGED
@@ -1,10 +1,11 @@
1
1
  # @talismn/token-rates
2
2
 
3
- ## 0.0.0-pr563-20230222052739
3
+ ## 0.0.0-pr573-20230227134247
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - 5ddeee95: fix: tokenRates in @talismn/balances-react
7
+ - Updated dependencies [87a1348]
8
+ - @talismn/chaindata-provider@0.0.0-pr573-20230227134247
8
9
 
9
10
  ## 0.1.14
10
11
 
@@ -1,3 +1,2 @@
1
- export * from "./TalismanTokenRatesDatabase";
2
1
  export * from "./TokenRates";
3
2
  export * from "./types";
@@ -1,10 +1,6 @@
1
1
  import { TokenId } from "@talismn/chaindata-provider";
2
2
  export type TokenRatesList = Record<TokenId, TokenRates>;
3
3
  export type TokenRateCurrency = keyof TokenRates;
4
- export type DbTokenRates = {
5
- tokenId: TokenId;
6
- rates: TokenRates;
7
- };
8
4
  export type TokenRates = {
9
5
  /** us dollar rate */
10
6
  usd: number | null;
@@ -2,34 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dexie = require('dexie');
6
5
  var axios = require('axios');
7
6
 
8
7
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
9
8
 
10
9
  var axios__default = /*#__PURE__*/_interopDefault(axios);
11
10
 
12
- class TalismanTokenRatesDatabase extends dexie.Dexie {
13
- constructor() {
14
- super("TalismanTokenRates");
15
-
16
- // https://dexie.org/docs/Tutorial/Design#database-versioning
17
- this.version(1).stores({
18
- // You only need to specify properties that you wish to index.
19
- // The object store will allow any properties on your stored objects but you can only query them by indexed properties
20
- // https://dexie.org/docs/API-Reference#declare-database
21
- //
22
- // Never index properties containing images, movies or large (huge) strings. Store them in IndexedDB, yes! but just don’t index them!
23
- // https://dexie.org/docs/Version/Version.stores()#warning
24
- tokenRates: "tokenId"
25
- });
26
-
27
- // this.on("ready", async () => {})
28
- }
29
- }
30
-
31
- const db = new TalismanTokenRatesDatabase();
32
-
33
11
  const NewTokenRates = () => ({
34
12
  usd: null,
35
13
  aud: null,
@@ -126,7 +104,5 @@ function hasCoingeckoId(token) {
126
104
  }
127
105
 
128
106
  exports.NewTokenRates = NewTokenRates;
129
- exports.TalismanTokenRatesDatabase = TalismanTokenRatesDatabase;
130
- exports.db = db;
131
107
  exports.fetchTokenRates = fetchTokenRates;
132
108
  exports.hasCoingeckoId = hasCoingeckoId;
@@ -2,34 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dexie = require('dexie');
6
5
  var axios = require('axios');
7
6
 
8
7
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
9
8
 
10
9
  var axios__default = /*#__PURE__*/_interopDefault(axios);
11
10
 
12
- class TalismanTokenRatesDatabase extends dexie.Dexie {
13
- constructor() {
14
- super("TalismanTokenRates");
15
-
16
- // https://dexie.org/docs/Tutorial/Design#database-versioning
17
- this.version(1).stores({
18
- // You only need to specify properties that you wish to index.
19
- // The object store will allow any properties on your stored objects but you can only query them by indexed properties
20
- // https://dexie.org/docs/API-Reference#declare-database
21
- //
22
- // Never index properties containing images, movies or large (huge) strings. Store them in IndexedDB, yes! but just don’t index them!
23
- // https://dexie.org/docs/Version/Version.stores()#warning
24
- tokenRates: "tokenId"
25
- });
26
-
27
- // this.on("ready", async () => {})
28
- }
29
- }
30
-
31
- const db = new TalismanTokenRatesDatabase();
32
-
33
11
  const NewTokenRates = () => ({
34
12
  usd: null,
35
13
  aud: null,
@@ -126,7 +104,5 @@ function hasCoingeckoId(token) {
126
104
  }
127
105
 
128
106
  exports.NewTokenRates = NewTokenRates;
129
- exports.TalismanTokenRatesDatabase = TalismanTokenRatesDatabase;
130
- exports.db = db;
131
107
  exports.fetchTokenRates = fetchTokenRates;
132
108
  exports.hasCoingeckoId = hasCoingeckoId;
@@ -1,27 +1,5 @@
1
- import { Dexie } from 'dexie';
2
1
  import axios from 'axios';
3
2
 
4
- class TalismanTokenRatesDatabase extends Dexie {
5
- constructor() {
6
- super("TalismanTokenRates");
7
-
8
- // https://dexie.org/docs/Tutorial/Design#database-versioning
9
- this.version(1).stores({
10
- // You only need to specify properties that you wish to index.
11
- // The object store will allow any properties on your stored objects but you can only query them by indexed properties
12
- // https://dexie.org/docs/API-Reference#declare-database
13
- //
14
- // Never index properties containing images, movies or large (huge) strings. Store them in IndexedDB, yes! but just don’t index them!
15
- // https://dexie.org/docs/Version/Version.stores()#warning
16
- tokenRates: "tokenId"
17
- });
18
-
19
- // this.on("ready", async () => {})
20
- }
21
- }
22
-
23
- const db = new TalismanTokenRatesDatabase();
24
-
25
3
  const NewTokenRates = () => ({
26
4
  usd: null,
27
5
  aud: null,
@@ -117,4 +95,4 @@ function hasCoingeckoId(token) {
117
95
  return "coingeckoId" in token && typeof token.coingeckoId === "string";
118
96
  }
119
97
 
120
- export { NewTokenRates, TalismanTokenRatesDatabase, db, fetchTokenRates, hasCoingeckoId };
98
+ export { NewTokenRates, fetchTokenRates, hasCoingeckoId };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talismn/token-rates",
3
- "version": "0.0.0-pr563-20230222052739",
3
+ "version": "0.0.0-pr573-20230227134247",
4
4
  "author": "Talisman",
5
5
  "homepage": "https://talisman.xyz",
6
6
  "license": "UNLICENSED",
@@ -26,9 +26,8 @@
26
26
  "clean": "rm -rf dist && rm -rf .turbo rm -rf node_modules"
27
27
  },
28
28
  "dependencies": {
29
- "@talismn/chaindata-provider": "^0.4.2",
30
- "axios": "^0.27.2",
31
- "dexie": "^3.2.2"
29
+ "@talismn/chaindata-provider": "^0.0.0-pr573-20230227134247",
30
+ "axios": "^0.27.2"
32
31
  },
33
32
  "devDependencies": {
34
33
  "@talismn/eslint-config": "^0.0.1",
@@ -1,7 +0,0 @@
1
- import { Dexie } from "dexie";
2
- import { DbTokenRates } from "./types";
3
- export declare class TalismanTokenRatesDatabase extends Dexie {
4
- tokenRates: Dexie.Table<DbTokenRates, string>;
5
- constructor();
6
- }
7
- export declare const db: TalismanTokenRatesDatabase;