Skip to content

Commit 4e29347

Browse files
committed
feat(*): exclude usdt
1 parent 3f65102 commit 4e29347

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

dist/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ async function refreshPortfolio() {
4242

4343
await _Portfolio2.default.addMissingCoins();
4444

45+
_Portfolio2.default.removeCoin('USDT');
46+
4547
console.log(_Portfolio2.default.getOutput());
4648
} catch (error) {
4749
console.log(error);

dist/model/Portfolio.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ var Portfolio = function () {
5454
highestRank = coin.getRank() > highestRank ? coin.getRank() : highestRank;
5555
}
5656
}
57+
}, {
58+
key: 'removeCoin',
59+
value: function removeCoin(symbol) {
60+
delete portfolio[symbol];
61+
}
5762
}, {
5863
key: 'addCoins',
5964
value: async function addCoins(coins) {

src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ async function refreshPortfolio() {
2323

2424
await Portfolio.addMissingCoins()
2525

26+
Portfolio.removeCoin('USDT')
27+
2628
console.log(Portfolio.getOutput())
2729
} catch (error) {
2830
console.log(error)

src/model/Portfolio.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ export default class Portfolio {
2626
}
2727
}
2828

29+
static removeCoin(symbol) {
30+
delete portfolio[symbol]
31+
}
32+
2933
static async addCoins(coins) {
3034
return new Promise(async (resolve) => {
3135
for (let index in coins) {

0 commit comments

Comments
 (0)