Skip to content

Commit 5750560

Browse files
committed
Rename EQL to EQLI in the list of default currencies
And add migration script. Finishes 11f68e7 Fixes #537
1 parent 406c639 commit 5750560

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

app/config.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const defaults = {
2222
'DASH',
2323
'DNR',
2424
'DOGE',
25-
'EQL',
25+
'EQLI',
2626
'HUSH',
2727
'KMD',
2828
'LTC',
@@ -41,4 +41,19 @@ if (isNightlyBuild) {
4141
defaults.enabledCoins.push('PIZZA', 'BEER');
4242
}
4343

44-
module.exports = new Store({defaults});
44+
const renameEqlToEqli = store => {
45+
let enabledCoins = store.get('enabledCoins');
46+
if (enabledCoins.includes('EQL')) {
47+
enabledCoins = enabledCoins.filter(x => x !== 'EQL' && x !== 'EQLI');
48+
enabledCoins.push('EQLI');
49+
store.set('enabledCoins', enabledCoins);
50+
}
51+
};
52+
53+
const migrate = store => {
54+
renameEqlToEqli(store);
55+
};
56+
57+
const store = new Store({defaults});
58+
migrate(store);
59+
module.exports = store;

0 commit comments

Comments
 (0)