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

Commit 22e1418

Browse files
fix currency
1 parent 7173d83 commit 22e1418

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/trade/tradeDialog.es6

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -440,12 +440,8 @@ function init_state(available,root, dialog, symbol, contracts_for_spot) {
440440
var update_currency = function() {
441441
/* change currency on user login */
442442
if(liveapi.is_authenticated()) {
443-
liveapi.send({ payout_currencies: 1 })
444-
.then(function(data){
445-
state.currency.value = data.payout_currencies[0];
446-
state.currency.array = data.payout_currencies;
447-
})
448-
.catch(function(err) { console.error(err); });
443+
state.currency.value = local_storage.get('authorize').currency;
444+
state.currency.array = [local_storage.get('authorize').currency];
449445
}
450446
};
451447

@@ -1094,7 +1090,6 @@ function init_state(available,root, dialog, symbol, contracts_for_spot) {
10941090

10951091
liveapi.events.on('set_account_currency', update_currency);
10961092
liveapi.events.on('login', update_currency);
1097-
10981093
update_currency();
10991094

11001095
return state;

0 commit comments

Comments
 (0)