Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit 311ccb2

Browse files
author
Aaron
authored
Merge pull request #2738 from aaron-binary/balance-block
aaron/Remove deducting trade amount prematurely
2 parents e112fb8 + f2fe1a4 commit 311ccb2

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/botPage/bot/TradeEngine/Balance.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,8 @@ export default Engine =>
2020
}
2121
// eslint-disable-next-line class-methods-use-this
2222
getBalance(type) {
23-
const { scope } = this.store.getState();
24-
const currency = globalObserver.getState('currency');
25-
let balance = globalObserver.getState('balance');
26-
27-
// Deduct trade `amount` in this scope for correct value in `balance`-block
28-
if (scope === 'BEFORE_PURCHASE') {
29-
balance = roundBalance({
30-
balance: Number(balance) - this.tradeOptions.amount,
31-
currency,
32-
});
33-
}
34-
23+
const balance = globalObserver.getState('balance');
3524
const balanceStr = `${balance}`;
36-
3725
return type === 'STR' ? balanceStr : Number(balance);
3826
}
3927
};

0 commit comments

Comments
 (0)