Skip to content

Commit

Permalink
fix #12 disabling a coin should be possible again
Browse files Browse the repository at this point in the history
  • Loading branch information
Nam Hoang committed Nov 18, 2019
1 parent d584339 commit 2a794ea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
16 changes: 7 additions & 9 deletions app/renderer/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,13 @@ export default class Api {
}
}

// Mm v2 doesn't currently have an endpoint for disabling a coin, so we do nothing.
// https://github.com/artemii235/SuperNET/issues/459
async disableCurrency(/** symbol */) {
/// ow(symbol, 'symbol', symbolPredicate);

// return this.request({
// method: 'disable',
// coin: symbol,
// });
async disableCurrency(symbol) {
ow(symbol, 'symbol', symbolPredicate);

return this.request({
method: 'disable_coin',
coin: symbol,
});
}

// Mm v2
Expand Down
5 changes: 0 additions & 5 deletions app/renderer/containers/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,11 +413,6 @@ class AppContainer extends SuperContainer {
const enabledCoins = prevState.enabledCoins.filter(enabledCoin => enabledCoin !== coin);
setCurrencies(prevState.portfolio.id, enabledCoins);

// TODO: Remove this when https://github.com/artemii235/SuperNET/issues/459 is fixed.
api.dialog.showMessageBox(activeWindow(), {
message: 'Marketmaker v2 cannot currently disable currencies when running, so you need to restart HyperDEX for it to take effect.',
});

return {enabledCoins};
}, () => {
this.events.emit('enabled-currencies-changed');
Expand Down

0 comments on commit 2a794ea

Please sign in to comment.