2018-12-01 22:16:58 +00:00
|
|
|
import StandardToken from 'Embark/contracts/StandardToken'
|
2019-01-04 20:31:31 +00:00
|
|
|
import SNT from 'Embark/contracts/SNT'
|
2019-01-04 20:52:01 +00:00
|
|
|
import sntIco from 'cryptocurrency-icons/svg/color/snt.svg'
|
2018-12-01 22:16:58 +00:00
|
|
|
|
2018-11-30 18:36:09 +00:00
|
|
|
export const TOKEN_ICON_API = 'https://raw.githubusercontent.com/TrustWallet/tokens/master/images'
|
|
|
|
export const TOKEN_COIN_API = 'https://raw.githubusercontent.com/TrustWallet/tokens/master/coins'
|
2019-02-06 19:33:08 +00:00
|
|
|
export const TOKEN_API = 'https://raw.githubusercontent.com/TrustWallet/tokens/master/tokens'
|
2018-11-30 18:36:09 +00:00
|
|
|
export const currencies = [
|
|
|
|
{
|
|
|
|
value: 'ETH',
|
|
|
|
label: 'Ether',
|
|
|
|
img: `${TOKEN_COIN_API}/60.png`,
|
2019-02-06 19:33:08 +00:00
|
|
|
width: '10%'
|
2018-11-30 18:36:09 +00:00
|
|
|
},
|
|
|
|
{
|
2019-01-04 20:31:31 +00:00
|
|
|
value: SNT._address,
|
2018-11-30 18:36:09 +00:00
|
|
|
label: 'Status (SNT)',
|
2019-01-04 20:52:01 +00:00
|
|
|
img: sntIco
|
2018-11-30 18:36:09 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
value: '0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359',
|
|
|
|
label: 'DAI',
|
2019-02-06 19:33:08 +00:00
|
|
|
img: `${TOKEN_API}/0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359.png`,
|
|
|
|
width: '10%'
|
2018-11-30 21:19:46 +00:00
|
|
|
}
|
2018-11-30 18:36:09 +00:00
|
|
|
]
|
2018-11-30 21:19:46 +00:00
|
|
|
|
|
|
|
export const getTokenLabel = value => {
|
|
|
|
const token = currencies.find(currency => currency.value === value)
|
|
|
|
return token ? token.label : null
|
|
|
|
}
|
2019-01-11 20:55:42 +00:00
|
|
|
|
|
|
|
export const getTokenAddress = label => {
|
|
|
|
const token = currencies.find(currency => currency.label == label)
|
|
|
|
return token ? token.value : null
|
|
|
|
}
|