@ledgerhq/live-countervalues 0.8.0-nightly.7 → 0.8.0
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +29 -60
- package/lib/helpers.d.ts.map +1 -1
- package/lib/helpers.js +3 -0
- package/lib/helpers.js.map +1 -1
- package/lib/logic.integ.test.d.ts +2 -0
- package/lib/logic.integ.test.d.ts.map +1 -0
- package/lib/logic.integ.test.js +274 -0
- package/lib/logic.integ.test.js.map +1 -0
- package/lib/logic.test.d.ts +2 -0
- package/lib/logic.test.d.ts.map +1 -0
- package/lib/logic.test.js +29 -0
- package/lib/logic.test.js.map +1 -0
- package/lib/mock.test.d.ts +2 -0
- package/lib/mock.test.d.ts.map +1 -0
- package/lib/mock.test.js +253 -0
- package/lib/mock.test.js.map +1 -0
- package/lib/portfolio.test.d.ts +2 -0
- package/lib/portfolio.test.d.ts.map +1 -0
- package/lib/portfolio.test.js +280 -0
- package/lib/portfolio.test.js.map +1 -0
- package/lib-es/helpers.d.ts.map +1 -1
- package/lib-es/helpers.js +3 -0
- package/lib-es/helpers.js.map +1 -1
- package/lib-es/logic.integ.test.d.ts +2 -0
- package/lib-es/logic.integ.test.d.ts.map +1 -0
- package/lib-es/logic.integ.test.js +269 -0
- package/lib-es/logic.integ.test.js.map +1 -0
- package/lib-es/logic.test.d.ts +2 -0
- package/lib-es/logic.test.d.ts.map +1 -0
- package/lib-es/logic.test.js +27 -0
- package/lib-es/logic.test.js.map +1 -0
- package/lib-es/mock.test.d.ts +2 -0
- package/lib-es/mock.test.d.ts.map +1 -0
- package/lib-es/mock.test.js +225 -0
- package/lib-es/mock.test.js.map +1 -0
- package/lib-es/portfolio.test.d.ts +2 -0
- package/lib-es/portfolio.test.d.ts.map +1 -0
- package/lib-es/portfolio.test.js +278 -0
- package/lib-es/portfolio.test.js.map +1 -0
- package/package.json +7 -7
- package/src/helpers.ts +2 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import "@ledgerhq/coin-framework/test-helpers/staticTime";
|
|
2
|
+
import { getFiatCurrencyByTicker, getCryptoCurrencyById } from "@ledgerhq/cryptoassets";
|
|
3
|
+
import { initialState, loadCountervalues, inferTrackingPairForAccounts } from "./logic";
|
|
4
|
+
import { getPortfolioCount, getBalanceHistory, getBalanceHistoryWithCountervalue, getPortfolio, getCurrencyPortfolio, getAssetsDistribution, getPortfolioRangeConfig, getDates, getRanges, startOfHour, startOfDay, startOfWeek, orderAccountsByFiatValue, } from "./portfolio";
|
|
5
|
+
import { setEnv } from "@ledgerhq/live-env";
|
|
6
|
+
import { genAccount } from "@ledgerhq/coin-framework/mocks/account";
|
|
7
|
+
import { getAccountCurrency } from "@ledgerhq/coin-framework/account/index";
|
|
8
|
+
import { setSupportedCurrencies } from "@ledgerhq/coin-framework/currencies/support";
|
|
9
|
+
setSupportedCurrencies(["ethereum", "ethereum_classic", "ripple"]);
|
|
10
|
+
setEnv("MOCK", "1");
|
|
11
|
+
setEnv("MOCK_COUNTERVALUES", "1");
|
|
12
|
+
describe("Portfolio", () => {
|
|
13
|
+
const rangeCount = [
|
|
14
|
+
["all", 52],
|
|
15
|
+
["year", 52],
|
|
16
|
+
["month", 30],
|
|
17
|
+
["week", 168],
|
|
18
|
+
["day", 24],
|
|
19
|
+
];
|
|
20
|
+
describe("getPortfolioCount", () => {
|
|
21
|
+
const accounts = Array.from({
|
|
22
|
+
length: 100,
|
|
23
|
+
}).map((_, j) => genAccount("portfolio_" + j));
|
|
24
|
+
describe("default count", () => {
|
|
25
|
+
rangeCount.forEach(([range, count]) => {
|
|
26
|
+
it(`shoud return default count (${range})`, () => {
|
|
27
|
+
const res = getPortfolioCount(accounts, range);
|
|
28
|
+
expect(res).toBe(count);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
describe("all time", () => {
|
|
33
|
+
const range = "all";
|
|
34
|
+
it("should return calculated count", () => {
|
|
35
|
+
const accounts = [
|
|
36
|
+
{
|
|
37
|
+
...genAccount("bitcoin_1"),
|
|
38
|
+
creationDate: new Date("2008-10-31"), // Bitcoin paper issued
|
|
39
|
+
},
|
|
40
|
+
];
|
|
41
|
+
const res = getPortfolioCount(accounts, range);
|
|
42
|
+
expect(res).toBe(491);
|
|
43
|
+
});
|
|
44
|
+
it("should return at least a year", () => {
|
|
45
|
+
const res = getPortfolioCount(accounts, range);
|
|
46
|
+
const count = getPortfolioRangeConfig("year").count;
|
|
47
|
+
expect(res).toBe(count);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
describe("getBalanceHistory", () => {
|
|
52
|
+
const account = genAccount("account_1");
|
|
53
|
+
describe("snapshots", () => {
|
|
54
|
+
rangeCount.forEach(([range, count]) => {
|
|
55
|
+
it("should match its prev snapshot", () => {
|
|
56
|
+
const history = getBalanceHistory(account, range, count);
|
|
57
|
+
expect(history).toMatchSnapshot();
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
it("should return history with length specified with count arg", () => {
|
|
62
|
+
const [[range, count]] = rangeCount;
|
|
63
|
+
const history = getBalanceHistory(account, range, count);
|
|
64
|
+
expect(history).toBeInstanceOf(Array);
|
|
65
|
+
expect(history.length).toBe(count);
|
|
66
|
+
});
|
|
67
|
+
it("should have dates matche getDates", () => {
|
|
68
|
+
const [, [range, count]] = rangeCount;
|
|
69
|
+
const history = getBalanceHistory(account, range, count);
|
|
70
|
+
const dates = getDates(range, count);
|
|
71
|
+
expect(history.map(p => p.date)).toMatchObject(dates);
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
describe("getBalanceHistoryWithCountervalue", () => {
|
|
75
|
+
const account = genAccountBitcoin();
|
|
76
|
+
const [range, count] = rangeCount[1];
|
|
77
|
+
test("coutnervalueAvailable should be false when the latest countervalue does NOT exists", async () => {
|
|
78
|
+
const { to } = await loadCV(account);
|
|
79
|
+
const state = { ...initialState, data: {} };
|
|
80
|
+
const cv = getBalanceHistoryWithCountervalue(account, range, count, state, to);
|
|
81
|
+
expect(cv.countervalueAvailable).toBe(false);
|
|
82
|
+
});
|
|
83
|
+
it("should return same value as history", async () => {
|
|
84
|
+
const { state, to } = await loadCV(account);
|
|
85
|
+
const cv = getBalanceHistoryWithCountervalue(account, range, count, state, to);
|
|
86
|
+
const history = getBalanceHistory(account, range, count);
|
|
87
|
+
expect(cv.countervalueAvailable).toBe(true);
|
|
88
|
+
expect(cv.history.map(p => ({
|
|
89
|
+
date: p.date,
|
|
90
|
+
value: p.value,
|
|
91
|
+
}))).toMatchObject(history);
|
|
92
|
+
});
|
|
93
|
+
test("snapshot", async () => {
|
|
94
|
+
const { state, to } = await loadCV(account);
|
|
95
|
+
const cv = getBalanceHistoryWithCountervalue(account, range, count, state, to);
|
|
96
|
+
expect(cv).toMatchSnapshot();
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
describe("getPortfolio", () => {
|
|
100
|
+
const account = genAccountBitcoin();
|
|
101
|
+
const [range, count] = rangeCount[3];
|
|
102
|
+
it("should return account as avilableAccounts when balanceAvailable is ture", async () => {
|
|
103
|
+
const { state, to } = await loadCV(account);
|
|
104
|
+
const portfolio = getPortfolio([account], range, state, to);
|
|
105
|
+
expect(portfolio.balanceAvailable).toBe(true);
|
|
106
|
+
expect(portfolio.availableAccounts).toMatchObject([account]);
|
|
107
|
+
});
|
|
108
|
+
test("balanceAvailable should be false and return as unavilableCurrenccies when the latest countervalue does NOT exists", async () => {
|
|
109
|
+
const { to } = await loadCV(account);
|
|
110
|
+
const state = { ...initialState, data: {} };
|
|
111
|
+
const portfolio = getPortfolio([account], range, state, to);
|
|
112
|
+
expect(portfolio.unavailableCurrencies).toMatchObject([getAccountCurrency(account)]);
|
|
113
|
+
expect(portfolio.balanceAvailable).toBe(false);
|
|
114
|
+
});
|
|
115
|
+
it("should have history identical to the account history", async () => {
|
|
116
|
+
const account2 = genAccountBitcoin("bitcoin_2");
|
|
117
|
+
const { state, to } = await loadCV(account);
|
|
118
|
+
const portfolio = getPortfolio([account, account2], range, state, to);
|
|
119
|
+
const { history: history } = getBalanceHistoryWithCountervalue(account, range, count, state, to);
|
|
120
|
+
const { history: history2 } = getBalanceHistoryWithCountervalue(account2, range, count, state, to);
|
|
121
|
+
expect(portfolio.histories).toMatchObject([history, history2]);
|
|
122
|
+
});
|
|
123
|
+
it("should recompose partial cache", async () => {
|
|
124
|
+
const account = genAccountBitcoin("bitcoin_whatever");
|
|
125
|
+
const { state, to } = await loadCV(account);
|
|
126
|
+
const { history: history } = getBalanceHistoryWithCountervalue(account, "month", 100, state, to);
|
|
127
|
+
const { latestDate, balances } = account.balanceHistoryCache.DAY;
|
|
128
|
+
account.balanceHistoryCache.DAY = {
|
|
129
|
+
latestDate: (latestDate || 0) - 24 * 1000 * 60 * 60,
|
|
130
|
+
balances: balances.slice(0, balances.length - 2),
|
|
131
|
+
};
|
|
132
|
+
const { history: history2 } = getBalanceHistoryWithCountervalue(account, "month", 100, state, to);
|
|
133
|
+
expect(history).toMatchObject(history2);
|
|
134
|
+
});
|
|
135
|
+
it("should double the amounts with twice the same account", async () => {
|
|
136
|
+
const { state, to } = await loadCV(account);
|
|
137
|
+
const portfolio = getPortfolio([account, account], range, state, to);
|
|
138
|
+
const { history } = getBalanceHistoryWithCountervalue(account, range, count, state, to);
|
|
139
|
+
portfolio.balanceHistory.forEach((h, i) => {
|
|
140
|
+
expect(h.value).toBe((history[i].countervalue ?? 0) * 2);
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
it("snapshot", async () => {
|
|
144
|
+
const { state, to } = await loadCV(account);
|
|
145
|
+
const portfolio = getPortfolio([account], range, state, to);
|
|
146
|
+
expect(portfolio).toMatchSnapshot();
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
describe("getCurrencyPortfolio", () => {
|
|
150
|
+
const account = genAccountBitcoin();
|
|
151
|
+
const [range, count] = rangeCount[3];
|
|
152
|
+
it("should return accounts when balanceAvailable is ture", async () => {
|
|
153
|
+
const { state, to } = await loadCV(account);
|
|
154
|
+
const portfolio = getCurrencyPortfolio([account], range, state, to);
|
|
155
|
+
expect(portfolio.countervalueAvailable).toBe(true);
|
|
156
|
+
expect(portfolio.accounts).toMatchObject([account]);
|
|
157
|
+
});
|
|
158
|
+
test("countervalueAvailable should be false when the latest countervalue does NOT exists", async () => {
|
|
159
|
+
const { to } = await loadCV(account);
|
|
160
|
+
const state = { ...initialState, data: {} };
|
|
161
|
+
const portfolio = getCurrencyPortfolio([account], range, state, to);
|
|
162
|
+
expect(portfolio.countervalueAvailable).toBe(false);
|
|
163
|
+
});
|
|
164
|
+
it("should have history identical to the account history", async () => {
|
|
165
|
+
const account2 = genAccountBitcoin("bitcoin_2");
|
|
166
|
+
const { state, to } = await loadCV(account);
|
|
167
|
+
const portfolio = getCurrencyPortfolio([account, account2], range, state, to);
|
|
168
|
+
const { history: history } = getBalanceHistoryWithCountervalue(account, range, count, state, to);
|
|
169
|
+
const { history: history2 } = getBalanceHistoryWithCountervalue(account2, range, count, state, to);
|
|
170
|
+
expect(portfolio.histories).toMatchObject([history, history2]);
|
|
171
|
+
});
|
|
172
|
+
it("should double the amounts with twice the same account", async () => {
|
|
173
|
+
const { state, to } = await loadCV(account);
|
|
174
|
+
const portfolio = getCurrencyPortfolio([account, account], range, state, to);
|
|
175
|
+
const { history } = getBalanceHistoryWithCountervalue(account, range, count, state, to);
|
|
176
|
+
portfolio.history.forEach((h, i) => {
|
|
177
|
+
expect(h.countervalue).toBe((history[i].countervalue ?? 0) * 2);
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
it("snapshot", async () => {
|
|
181
|
+
const { state, to } = await loadCV(account);
|
|
182
|
+
const portfolio = getCurrencyPortfolio([account], range, state, to);
|
|
183
|
+
expect(portfolio).toMatchSnapshot();
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
describe("getAssetsDistribution", () => {
|
|
187
|
+
it("snapshot", async () => {
|
|
188
|
+
const account = genAccountBitcoin();
|
|
189
|
+
const { state, to } = await loadCV(account);
|
|
190
|
+
const assets = getAssetsDistribution([account], state, to);
|
|
191
|
+
expect(assets).toMatchSnapshot();
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
describe("range module", () => {
|
|
195
|
+
test("getRanges", () => {
|
|
196
|
+
const ranges = ["all", "year", "month", "week", "day"];
|
|
197
|
+
const res = getRanges();
|
|
198
|
+
res.forEach(r => {
|
|
199
|
+
const match = ranges.includes(r);
|
|
200
|
+
expect(match).toBe(true);
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
describe("date utils", () => {
|
|
206
|
+
describe("startOfHour", () => {
|
|
207
|
+
test("basic test", () => {
|
|
208
|
+
expect(startOfHour(new Date(1655827384305)).toISOString()).toBe("2022-06-21T16:00:00.000Z");
|
|
209
|
+
});
|
|
210
|
+
});
|
|
211
|
+
describe("startOfDay", () => {
|
|
212
|
+
test("basic test", () => {
|
|
213
|
+
expect(startOfDay(new Date(1655827384305)).toISOString()).toBe("2022-06-21T04:00:00.000Z");
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
describe("startOfWeek", () => {
|
|
217
|
+
test("basic test", () => {
|
|
218
|
+
expect(startOfWeek(new Date(1655827384305)).toISOString()).toBe("2022-06-19T04:00:00.000Z");
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
describe("getPortfolioRangeConfig", () => {
|
|
222
|
+
test("returns a value for day", () => {
|
|
223
|
+
expect(getPortfolioRangeConfig("day")).toBeDefined();
|
|
224
|
+
});
|
|
225
|
+
test("returns a value for week", () => {
|
|
226
|
+
expect(getPortfolioRangeConfig("week")).toBeDefined();
|
|
227
|
+
});
|
|
228
|
+
test("returns a value for month", () => {
|
|
229
|
+
expect(getPortfolioRangeConfig("month")).toBeDefined();
|
|
230
|
+
});
|
|
231
|
+
});
|
|
232
|
+
describe("getDates", () => {
|
|
233
|
+
test("day returns an array of asked size", () => {
|
|
234
|
+
expect(getDates("day", 100).length).toEqual(100);
|
|
235
|
+
});
|
|
236
|
+
test("week returns an array of asked size", () => {
|
|
237
|
+
expect(getDates("week", 100).length).toEqual(100);
|
|
238
|
+
});
|
|
239
|
+
test("month returns an array of asked size", () => {
|
|
240
|
+
expect(getDates("month", 100).length).toEqual(100);
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
describe("getRanges", () => {
|
|
244
|
+
test("returns a non empty array", () => {
|
|
245
|
+
expect(getRanges().length).toBeGreaterThan(0);
|
|
246
|
+
});
|
|
247
|
+
});
|
|
248
|
+
describe("orderAccountsByFiatValue", () => {
|
|
249
|
+
test("should return accounts ordered by fiat value", async () => {
|
|
250
|
+
const account1 = genAccountBitcoin("bitcoin_1");
|
|
251
|
+
const account2 = genAccountBitcoin("bitcoin_2");
|
|
252
|
+
const { state, to } = await loadCV([account1, account2]);
|
|
253
|
+
const accounts = [account1, account2];
|
|
254
|
+
const orderedAccounts = orderAccountsByFiatValue(accounts, state, to);
|
|
255
|
+
expect(orderedAccounts).toMatchObject([account2, account1]);
|
|
256
|
+
});
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
function genAccountBitcoin(id = "bitcoin_1") {
|
|
260
|
+
return genAccount(id, {
|
|
261
|
+
currency: getCryptoCurrencyById("bitcoin"),
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
async function loadCV(a, cvTicker = "USD") {
|
|
265
|
+
const to = getFiatCurrencyByTicker(cvTicker);
|
|
266
|
+
const accounts = Array.isArray(a) ? a : [a];
|
|
267
|
+
const state = await loadCountervalues(initialState, {
|
|
268
|
+
trackingPairs: inferTrackingPairForAccounts(accounts, to),
|
|
269
|
+
autofillGaps: true,
|
|
270
|
+
refreshRate: 60000,
|
|
271
|
+
marketCapBatchingAfterRank: 20,
|
|
272
|
+
});
|
|
273
|
+
return {
|
|
274
|
+
state,
|
|
275
|
+
to,
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
//# sourceMappingURL=portfolio.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portfolio.test.js","sourceRoot":"","sources":["../src/portfolio.test.ts"],"names":[],"mappings":"AAAA,OAAO,kDAAkD,CAAC;AAE1D,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AACxF,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,iCAAiC,EACjC,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,QAAQ,EACR,SAAS,EACT,WAAW,EACX,UAAU,EACV,WAAW,EACX,wBAAwB,GACzB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAE5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAErF,sBAAsB,CAAC,CAAC,UAAU,EAAE,kBAAkB,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEnE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AACpB,MAAM,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC;AAClC,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,MAAM,UAAU,GAA+B;QAC7C,CAAC,KAAK,EAAE,EAAE,CAAC;QACX,CAAC,MAAM,EAAE,EAAE,CAAC;QACZ,CAAC,OAAO,EAAE,EAAE,CAAC;QACb,CAAC,MAAM,EAAE,GAAG,CAAC;QACb,CAAC,KAAK,EAAE,EAAE,CAAC;KACZ,CAAC;IACF,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;QACjC,MAAM,QA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EAAE,KAAK;QAClB,0BAA0B,EAAE,EAAE;KAC/B,CAAC,CAAC;IACH,OAAO;QACL,KAAK;QACL,EAAE;KACH,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/live-countervalues",
|
|
3
|
-
"version": "0.8.0
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Ledger Live countervalues module",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Ledger"
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"types": "lib/index.d.ts",
|
|
22
22
|
"license": "Apache-2.0",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@ledgerhq/types-live": "6.87.0
|
|
25
|
-
"@ledgerhq/types-cryptoassets": "7.29.0
|
|
26
|
-
"@ledgerhq/cryptoassets": "13.31.0
|
|
27
|
-
"@ledgerhq/coin-framework": "6.7.0
|
|
24
|
+
"@ledgerhq/types-live": "6.87.0",
|
|
25
|
+
"@ledgerhq/types-cryptoassets": "7.29.0",
|
|
26
|
+
"@ledgerhq/cryptoassets": "13.31.0",
|
|
27
|
+
"@ledgerhq/coin-framework": "6.7.0",
|
|
28
28
|
"@ledgerhq/logs": "6.13.0",
|
|
29
|
-
"@ledgerhq/live-network": "2.0.20
|
|
29
|
+
"@ledgerhq/live-network": "2.0.20",
|
|
30
30
|
"@ledgerhq/live-promise": "0.1.1",
|
|
31
|
-
"@ledgerhq/live-env": "2.19.0
|
|
31
|
+
"@ledgerhq/live-env": "2.19.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/jest": "^29.5.10",
|
package/src/helpers.ts
CHANGED
|
@@ -8,6 +8,8 @@ export const inferCurrencyAPIID = (currency: Currency): string => {
|
|
|
8
8
|
}
|
|
9
9
|
case "CryptoCurrency":
|
|
10
10
|
case "TokenCurrency": {
|
|
11
|
+
// temporary solution to support assethub_polkadot
|
|
12
|
+
if (currency.id === "assethub_polkadot") return "polkadot";
|
|
11
13
|
return currency.id;
|
|
12
14
|
}
|
|
13
15
|
}
|