Skip to content

Commit 65717ff

Browse files
author
Aaron Imming
committed
Merge branch 'dev' of github.com:binary-com/binary-bot into data-coercion
2 parents 394d95a + e71724d commit 65717ff

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/botPage/view/View.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import Tour from './tour';
1818
import TradeInfoPanel from './TradeInfoPanel';
1919
import { showDialog } from '../bot/tools';
2020
import Elevio from '../../common/elevio';
21-
import { updateConfigCurrencies } from '../common/const';
22-
import { roundBalance, isVirtual } from '../common/tools';
21+
import config, { updateConfigCurrencies } from '../common/const';
22+
import { isVirtual } from '../common/tools';
2323
import {
2424
logoutAllTokens,
2525
getOAuthURL,
@@ -66,8 +66,16 @@ api.events.on('balance', response => {
6666
balance: { balance: b, currency },
6767
} = response;
6868

69-
const balance = (+roundBalance({ currency, balance: b })).toLocaleString(getLanguage().replace('_', '-'));
70-
$('.topMenuBalance').text(`${balance} ${currency}`);
69+
const elTopMenuBalances = document.querySelectorAll('.topMenuBalance');
70+
const localString = getLanguage().replace('_', '-');
71+
const balance = (+b).toLocaleString(localString, {
72+
minimumFractionDigits: config.lists.CRYPTO_CURRENCIES.includes(currency) ? 8 : 2,
73+
});
74+
75+
elTopMenuBalances.forEach(elTopMenuBalance => {
76+
const element = elTopMenuBalance;
77+
element.textContent = `${balance} ${currency}`;
78+
});
7179
});
7280

7381
const addBalanceForToken = token => {

static/xml/toolbox.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@
241241
<block type="controls_whileUntil"></block>
242242
<block type="controls_for"></block>
243243
<block type="controls_forEach"></block>
244-
<block type="controls_for"></block>
245244
<block type="controls_flow_statements"></block>
246245
</category>
247246
</category>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy