Browse Source

reduce multiple ac check to one function

master
pbca26 8 years ago
parent
commit
9e18e256ae
  1. 49
      assets/scripts/dashboard.js
  2. 55
      assets/scripts/iguana_api.js
  3. 2
      assets/scripts/iguana_api/IguanaEDEX.js
  4. 98
      assets/scripts/kmd_wallet_dashboard.js

49
assets/scripts/dashboard.js

@ -940,54 +940,7 @@ var Dashboard = function() {
$('#addcoin_mdl_full_mode').prop('disabled', false);
}
if (tmp_coin_val == 'SUPERNET' ||
tmp_coin_val == 'REVS' ||
tmp_coin_val == 'WIRELESS' ||
tmp_coin_val == 'DEX' ||
tmp_coin_val == 'PANGEA' ||
tmp_coin_val == 'JUMBLR' ||
tmp_coin_val == 'BET' ||
tmp_coin_val == 'CRYPTO' ||
tmp_coin_val == 'HODL' ||
tmp_coin_val == 'SHARK' ||
tmp_coin_val == 'BOTS' ||
tmp_coin_val == 'MGW' ||
tmp_coin_val == 'MVP' ||
tmp_coin_val == 'KV' ||
tmp_coin_val == 'CEAL' ||
tmp_coin_val == 'MESH' ||
tmp_coin_val == 'USD' ||
tmp_coin_val == 'RON' ||
tmp_coin_val == 'EUR' ||
tmp_coin_val == 'JPY' ||
tmp_coin_val == 'GBP' ||
tmp_coin_val == 'AUD' ||
tmp_coin_val == 'CAD' ||
tmp_coin_val == 'CHF' ||
tmp_coin_val == 'NZD' ||
tmp_coin_val == 'CNY' ||
tmp_coin_val == 'RUB' ||
tmp_coin_val == 'MXN' ||
tmp_coin_val == 'BRL' ||
tmp_coin_val == 'INR' ||
tmp_coin_val == 'HKD' ||
tmp_coin_val == 'TRY' ||
tmp_coin_val == 'ZAR' ||
tmp_coin_val == 'PLN' ||
tmp_coin_val == 'NOK' ||
tmp_coin_val == 'SEK' ||
tmp_coin_val == 'DKK' ||
tmp_coin_val == 'CZK' ||
tmp_coin_val == 'HUF' ||
tmp_coin_val == 'ILS' ||
tmp_coin_val == 'KRW' ||
tmp_coin_val == 'MYR' ||
tmp_coin_val == 'PHP' ||
tmp_coin_val == 'SGD' ||
tmp_coin_val == 'THB' ||
tmp_coin_val == 'BGN' ||
tmp_coin_val == 'IDR' ||
tmp_coin_val == 'HRK') {
if (checkAC(tmp_coin_val)) {
$('#addcoin_mdl_native_mode').prop('disabled', false);
$('#addcoin_mdl_basilisk_mode')
.prop('disabled', false)

55
assets/scripts/iguana_api.js

@ -203,4 +203,59 @@ function Iguana_utxorawtx(data) {
resolve(result);
});
});
}
function checkAC(coinVal) {
if (coinVal == 'SUPERNET' ||
coinVal == 'REVS' ||
coinVal == 'WIRELESS' ||
coinVal == 'DEX' ||
coinVal == 'PANGEA' ||
coinVal == 'JUMBLR' ||
coinVal == 'BET' ||
coinVal == 'CRYPTO' ||
coinVal == 'HODL' ||
coinVal == 'SHARK' ||
coinVal == 'BOTS' ||
coinVal == 'MGW' ||
coinVal == 'MVP' ||
coinVal == 'KV' ||
coinVal == 'CEAL' ||
coinVal == 'MESH' ||
coinVal == 'USD' ||
coinVal == 'RON' ||
coinVal == 'EUR' ||
coinVal == 'JPY' ||
coinVal == 'GBP' ||
coinVal == 'AUD' ||
coinVal == 'CAD' ||
coinVal == 'CHF' ||
coinVal == 'NZD' ||
coinVal == 'CNY' ||
coinVal == 'RUB' ||
coinVal == 'MXN' ||
coinVal == 'BRL' ||
coinVal == 'INR' ||
coinVal == 'HKD' ||
coinVal == 'TRY' ||
coinVal == 'ZAR' ||
coinVal == 'PLN' ||
coinVal == 'NOK' ||
coinVal == 'SEK' ||
coinVal == 'DKK' ||
coinVal == 'CZK' ||
coinVal == 'HUF' ||
coinVal == 'ILS' ||
coinVal == 'KRW' ||
coinVal == 'MYR' ||
coinVal == 'PHP' ||
coinVal == 'SGD' ||
coinVal == 'THB' ||
coinVal == 'BGN' ||
coinVal == 'IDR' ||
coinVal == 'HRK') {
return true;
} else {
return false;
}
}

2
assets/scripts/iguana_api/IguanaEDEX.js

@ -695,7 +695,7 @@ function EDEXgetaddrbyaccount(coin) {
'account': '*'
},
tmp_addr_label = '<span class="label label-default">' +
'<i class="icon fa-eye"></i> ' + _lang[defaultLang].IAPP.PUBLIC_SM +
'<i class="icon fa-eye"></i> ' + _lang[defaultLang].IAPI.PUBLIC_SM +
'</span>';
active_edexcoinmodecode = sessionStorage.getItem('edexTmpMode');

98
assets/scripts/kmd_wallet_dashboard.js

@ -39,54 +39,7 @@ function getHeaderActionMenuButtonCoinCode() {
if ( extcoin == 'KMD') { action_menu_button_code = 'kmd'; };
if ( extcoin == 'ZEC') { action_menu_button_code = 'zec'; };
if (extcoin == 'SUPERNET' ||
extcoin == 'REVS' ||
extcoin == 'DEX' ||
extcoin == 'PANGEA' ||
extcoin == 'JUMBLR' ||
extcoin == 'BET' ||
extcoin == 'CRYPTO' ||
extcoin == 'HODL' ||
extcoin == 'SHARK' ||
extcoin == 'BOTS' ||
extcoin == 'MGW' ||
extcoin == 'MVP' ||
extcoin == 'WIRELESS' ||
extcoin == 'KV' ||
extcoin == 'CEAL' ||
extcoin == 'MESH' ||
extcoin == 'USD' ||
extcoin == 'RON' ||
extcoin == 'EUR' ||
extcoin == 'JPY' ||
extcoin == 'GBP' ||
extcoin == 'AUD' ||
extcoin == 'CAD' ||
extcoin == 'CHF' ||
extcoin == 'NZD' ||
extcoin == 'CNY' ||
extcoin == 'RUB' ||
extcoin == 'MXN' ||
extcoin == 'BRL' ||
extcoin == 'INR' ||
extcoin == 'HKD' ||
extcoin == 'TRY' ||
extcoin == 'ZAR' ||
extcoin == 'PLN' ||
extcoin == 'NOK' ||
extcoin == 'SEK' ||
extcoin == 'DKK' ||
extcoin == 'CZK' ||
extcoin == 'HUF' ||
extcoin == 'ILS' ||
extcoin == 'KRW' ||
extcoin == 'MYR' ||
extcoin == 'PHP' ||
extcoin == 'SGD' ||
extcoin == 'THB' ||
extcoin == 'BGN' ||
extcoin == 'IDR' ||
extcoin == 'HRK') { action_menu_button_code = 'acpax'; };
if (checkAC(extcoin)) { action_menu_button_code = 'acpax'; };
return action_menu_button_code;
}
@ -100,54 +53,7 @@ function getPassthruAgent() {
if ( extcoin == 'KMD') { passthru_agent = 'komodo'; };
if ( extcoin == 'ZEC') { passthru_agent = 'zcash'; };
if (extcoin == 'SUPERNET' ||
extcoin == 'REVS' ||
extcoin == 'DEX' ||
extcoin == 'PANGEA' ||
extcoin == 'JUMBLR' ||
extcoin == 'BET' ||
extcoin == 'CRYPTO' ||
extcoin == 'HODL' ||
extcoin == 'SHARK' ||
extcoin == 'BOTS' ||
extcoin == 'MGW' ||
extcoin == 'MVP' ||
extcoin == 'WIRELESS' ||
extcoin == 'KV' ||
extcoin == 'CEAL' ||
extcoin == 'MESH' ||
extcoin == 'USD' ||
extcoin == 'RON' ||
extcoin == 'EUR' ||
extcoin == 'JPY' ||
extcoin == 'GBP' ||
extcoin == 'AUD' ||
extcoin == 'CAD' ||
extcoin == 'CHF' ||
extcoin == 'NZD' ||
extcoin == 'CNY' ||
extcoin == 'RUB' ||
extcoin == 'MXN' ||
extcoin == 'BRL' ||
extcoin == 'INR' ||
extcoin == 'HKD' ||
extcoin == 'TRY' ||
extcoin == 'ZAR' ||
extcoin == 'PLN' ||
extcoin == 'NOK' ||
extcoin == 'SEK' ||
extcoin == 'DKK' ||
extcoin == 'CZK' ||
extcoin == 'HUF' ||
extcoin == 'ILS' ||
extcoin == 'KRW' ||
extcoin == 'MYR' ||
extcoin == 'PHP' ||
extcoin == 'SGD' ||
extcoin == 'THB' ||
extcoin == 'BGN' ||
extcoin == 'IDR' ||
extcoin == 'HRK') { passthru_agent = 'iguana'; };
if (checkAC(extcoin)) { passthru_agent = 'iguana'; };
return passthru_agent;
}

Loading…
Cancel
Save