From 68310f1a3bc9ed4f0b7f325494fd05fcbb508624 Mon Sep 17 00:00:00 2001 From: MiaoWoo Date: Wed, 17 Jul 2019 17:30:00 +0800 Subject: [PATCH] sync: sync upstream code Signed-off-by: MiaoWoo --- src/HTML/JS/mobile-wallet.js | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/HTML/JS/mobile-wallet.js b/src/HTML/JS/mobile-wallet.js index 4355432..eba0d43 100644 --- a/src/HTML/JS/mobile-wallet.js +++ b/src/HTML/JS/mobile-wallet.js @@ -75,11 +75,21 @@ window.onload = function () function OnLoad() { - if(Storage.getItem("NETWORK")) + if(window.location.protocol === "https:") { - NETWORK = Storage.getItem("NETWORK"); + NETWORK = "TERA-MAIN"; + FillSelect("idCurNetwork", [{value:NETWORK, text:"TERA MAIN"}]); + $("idCurNetwork").value = NETWORK; + Storage.setItem("NETWORK", NETWORK); + } + else + { + if(Storage.getItem("NETWORK")) + { + NETWORK = Storage.getItem("NETWORK"); + } + $("idCurNetwork").value = NETWORK; } - $("idCurNetwork").value = NETWORK; LoadValues(); InitDappsCard(); StartWebWallet(); @@ -302,10 +312,6 @@ function UpdatesAccountsData() } else { - if(FirstAccountsData && !Data.arr.length) - { - SelectTab('TabAccounts'); - } } FirstAccountsData = 0; }); @@ -411,7 +417,7 @@ function SetAccountsCard(Data,AccountsDataStr) var Str = StrAccCardTemplate; Str = Str.replace("AccCardTemplate", "idCard" + Item.Num); Str = Str.replace(/{Item.Num}/g, Item.Num); - var Str1, Str2, StrCurrencyName; + var Str1, Str2; if(Item.Value.SumCOIN || Item.Value.SumCENT) { Str1 = Item.Value.SumCOIN; @@ -422,7 +428,7 @@ function SetAccountsCard(Data,AccountsDataStr) Str1 = ""; Str2 = ""; } - StrCurrencyName = CurrencyName(Item.Currency); + var StrCurrencyName = CurrencyName(Item.Currency); Str = Str.replace("{Value.SumCOIN}", Str1); Str = Str.replace("{Value.SumCENT}", Str2); Str = Str.replace("{Value.CurrencyName}", StrCurrencyName);