8 changed files with 176 additions and 147 deletions
@ -1,50 +1,43 @@ |
|||||
import React from 'react'; |
|
||||
import { translate } from '../../translate/translate'; |
import { translate } from '../../translate/translate'; |
||||
import mainWindow from '../../util/mainWindow'; |
import mainWindow from '../../util/mainWindow'; |
||||
|
|
||||
class AddCoinOptionsAC extends React.Component { |
const addCoinOptionsAC = () => { |
||||
render() { |
const _assetChains = [ |
||||
const _assetChains = [ |
'bet', |
||||
'bet', |
'bots', |
||||
'bots', |
'ceal', |
||||
'ceal', |
'coqui', |
||||
'coqui', |
'crypto', |
||||
'crypto', |
'hodl', |
||||
'hodl', |
'dex', |
||||
'dex', |
'jumblr', |
||||
'jumblr', |
'kv', |
||||
'kv', |
'mgw', |
||||
'mgw', |
//'mvp',
|
||||
//'mvp',
|
'mnz', |
||||
'mnz', |
'pangea', |
||||
'pangea', |
'revs', |
||||
'revs', |
'mshark', |
||||
'mshark', |
'supernet', |
||||
'supernet', |
'wlc', |
||||
'wlc', |
]; |
||||
]; |
let _items = []; |
||||
let _items = []; |
|
||||
|
|
||||
for (let i = 0; i < _assetChains.length; i++) { |
for (let i = 0; i < _assetChains.length; i++) { |
||||
let availableModes = _assetChains[i] !== 'kv' && _assetChains[i] !== 'mgw' ? 'spv|native' : 'native'; |
let availableModes = _assetChains[i] !== 'kv' && _assetChains[i] !== 'mgw' ? 'spv|native' : 'native'; |
||||
|
|
||||
if (mainWindow.arch !== 'x64') { |
if (mainWindow.arch !== 'x64') { |
||||
availableModes = 'spv'; |
availableModes = 'spv'; |
||||
} |
|
||||
|
|
||||
_items.push( |
|
||||
<option |
|
||||
key={ _assetChains[i] } |
|
||||
value={ `${_assetChains[i].toUpperCase()}|${availableModes}` }>{ translate(`ASSETCHAINS.${_assetChains[i].toUpperCase()}`) }</option> |
|
||||
); |
|
||||
} |
} |
||||
|
|
||||
return ( |
_items.push({ |
||||
<optgroup label={ translate('ADD_COIN.ASSETCHAINS') }> |
label: translate(`ASSETCHAINS.${_assetChains[i].toUpperCase()}`), |
||||
{ _items } |
icon: _assetChains[i], |
||||
</optgroup> |
value: `${_assetChains[i].toUpperCase()}|${availableModes}`, |
||||
); |
}); |
||||
} |
} |
||||
|
|
||||
|
return _items; |
||||
} |
} |
||||
|
|
||||
export default AddCoinOptionsAC; |
export default addCoinOptionsAC; |
||||
|
@ -1,58 +1,51 @@ |
|||||
import React from 'react'; |
|
||||
import { translate } from '../../translate/translate'; |
import { translate } from '../../translate/translate'; |
||||
|
|
||||
class AddCoinOptionsACFiat extends React.Component { |
const addCoinOptionsACFiat = () => { |
||||
render() { |
const _fiat = [ |
||||
const _fiat = [ |
'aud', |
||||
'aud', |
'brl', |
||||
'brl', |
'gbp', |
||||
'gbp', |
'bgn', |
||||
'bgn', |
'cad', |
||||
'cad', |
'hrk', |
||||
'hrk', |
'czk', |
||||
'czk', |
'cny', |
||||
'cny', |
'dkk', |
||||
'dkk', |
'eur', |
||||
'eur', |
'hkd', |
||||
'hkd', |
'huf', |
||||
'huf', |
'inr', |
||||
'inr', |
'idr', |
||||
'idr', |
'ils', |
||||
'ils', |
'jpy', |
||||
'jpy', |
'krw', |
||||
'krw', |
'myr', |
||||
'myr', |
'mxn', |
||||
'mxn', |
'nzd', |
||||
'nzd', |
'nok', |
||||
'nok', |
'php', |
||||
'php', |
'pln', |
||||
'pln', |
'ron', |
||||
'ron', |
'rub', |
||||
'rub', |
'sgd', |
||||
'sgd', |
'zar', |
||||
'zar', |
'sek', |
||||
'sek', |
'chf', |
||||
'chf', |
'thb', |
||||
'thb', |
'try', |
||||
'try', |
'usd' |
||||
'usd' |
]; |
||||
]; |
let _items = []; |
||||
let _items = []; |
|
||||
|
|
||||
for (let i = 0; i < _fiat.length; i++) { |
for (let i = 0; i < _fiat.length; i++) { |
||||
_items.push( |
_items.push({ |
||||
<option |
label: translate(`FIAT_CURRENCIES.${_fiat[i].toUpperCase()}`), |
||||
key={ _fiat[i] } |
icon: _fiat[i], |
||||
value={ `${_fiat[i].toUpperCase()}|native` }>{ translate(`FIAT_CURRENCIES.${_fiat[i].toUpperCase()}`) }</option> |
value: `${_fiat[i].toUpperCase()}|native`, |
||||
); |
}); |
||||
} |
|
||||
|
|
||||
return ( |
|
||||
<optgroup label={ translate('ADD_COIN.FIAT_CURRENCIES') }> |
|
||||
{ _items } |
|
||||
</optgroup> |
|
||||
); |
|
||||
} |
} |
||||
|
|
||||
|
return _items; |
||||
} |
} |
||||
|
|
||||
export default AddCoinOptionsACFiat; |
export default addCoinOptionsACFiat; |
||||
|
@ -1,24 +1,19 @@ |
|||||
import React from 'react'; |
|
||||
import { translate } from '../../translate/translate'; |
import { translate } from '../../translate/translate'; |
||||
import mainWindow from '../../util/mainWindow'; |
import mainWindow from '../../util/mainWindow'; |
||||
|
|
||||
class AddCoinOptionsCrypto extends React.Component { |
const addCoinOptionsCrypto = () => { |
||||
constructor() { |
const availableKMDModes = mainWindow.arch === 'x64' ? 'spv|native' : 'spv'; |
||||
super(); |
|
||||
this.state = { |
|
||||
}; |
|
||||
} |
|
||||
|
|
||||
render() { |
return [{ |
||||
let availableKMDModes = mainWindow.arch === 'x64' ? 'spv|native' : 'spv'; |
label: 'Komodo (KMD)', |
||||
|
icon: 'KMD', |
||||
return ( |
value: `KMD|${availableKMDModes}`, |
||||
<optgroup label={ translate('ADD_COIN.CRYPTO_CURRENCIES') }> |
}, |
||||
<option value={ `KMD|${availableKMDModes}` }>Komodo (KMD)</option> |
{ |
||||
<option value="CHIPS|spv">Chips (CHIPS)</option> |
label: 'Chips (CHIPS)', |
||||
</optgroup> |
icon: 'CHIPS', |
||||
); |
value: `CHIPS|spv`, |
||||
} |
}]; |
||||
} |
} |
||||
|
|
||||
export default AddCoinOptionsCrypto; |
export default addCoinOptionsCrypto; |
||||
|
Loading…
Reference in new issue