Add Default Tokens (#753)

This commit is contained in:
Eddie Wang 2018-01-08 21:59:32 -05:00 committed by Daniel Ternyak
parent 6920296f37
commit aef80e9bd4
3 changed files with 28 additions and 3 deletions

View File

@ -21,10 +21,9 @@ export const SHAPESHIFT_TOKEN_WHITELIST = [
'FUN',
'RLC',
'TRST',
'GUP',
'ETH'
'GUP'
];
export const SHAPESHIFT_WHITELIST = [...SHAPESHIFT_TOKEN_WHITELIST, 'ETC', 'BTC'];
export const SHAPESHIFT_WHITELIST = [...SHAPESHIFT_TOKEN_WHITELIST, 'ETH', 'ETC', 'BTC'];
class ShapeshiftService {
public whitelist = SHAPESHIFT_WHITELIST;

View File

@ -433,5 +433,20 @@
"address": "0xb110ec7b1dcb8fab8dedbf28f53bc63ea5bedd84",
"symbol": "XID",
"decimal": 8
},
{
"address": "0xE41d2489571d322189246DaFA5ebDe1F4699F498",
"symbol": "ZRX",
"decimal": 18
},
{
"address": "0x41e5560054824eA6B0732E656E3Ad64E20e94E45",
"symbol": "CVC",
"decimal": 8
},
{
"address": "0x0AbdAce70D3790235af448C88547603b945604ea",
"symbol": "DNT",
"decimal": 18
}
]

View File

@ -8,6 +8,17 @@ import {
import { normalize } from 'normalizr';
import * as schema from 'reducers/swap/schema';
import { TypeKeys } from 'actions/swap/constants';
import tokens from 'config/tokens/eth.json';
import { SHAPESHIFT_TOKEN_WHITELIST } from 'api/shapeshift';
describe('ensure whitelist', () => {
const findToken = (tkn: string) => tokens.find(t => t.symbol === tkn);
SHAPESHIFT_TOKEN_WHITELIST.forEach(t => {
it(`Should find Token ${t}`, () => {
expect(findToken(t)).toBeTruthy();
});
});
});
describe('swap reducer', () => {
const shapeshiftApiResponse = {