cleanup token list

This commit is contained in:
Barry Gitarts 2019-10-25 15:27:45 -04:00 committed by Barry G
parent d5438326c7
commit 5688cb6675
3 changed files with 6 additions and 13 deletions

View File

@ -75,7 +75,6 @@ function stepperProgress(values, projectData, submissionState, currencies) {
} }
function generateSend(projectId, goalToken, fundToken, amount, account) { function generateSend(projectId, goalToken, fundToken, amount, account) {
console.log({projectId, goalToken, fundToken, amount, account})
if (fundToken === IS_ETH) { if (fundToken === IS_ETH) {
return fundWithETH(projectId, goalToken) return fundWithETH(projectId, goalToken)
.send({from: account, value: amount}) .send({from: account, value: amount})

View File

@ -19,16 +19,10 @@ export const currencies = [
chainReadibleFn: toWei chainReadibleFn: toWei
}, },
{ {
value: SNT._address, value: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',
label: 'SNT', label: 'WBTC',
img: `${TOKEN_API}/0x744d70fdbe2ba4cf95131626614a1763df805b9e.png`, img: `${TOKEN_API}/0x2260fac5e5542a773aa44fbcfedf7c193bc2c599.png`,
width: '2rem', width: `2rem`,
contract: SNT,
humanReadibleFn: toEther,
chainReadibleFn: toWei,
getAllowance: () => getLpAllowance(SNT),
setAllowance: (amount) => transferApproval(SNT, amount)
}, },
{ {
value: '0xf5dce57282a584d2746faf1593d3121fcac444dc', value: '0xf5dce57282a584d2746faf1593d3121fcac444dc',

View File

@ -40,9 +40,9 @@ const formatter = new Intl.NumberFormat('en-US', {
}) })
export const convertTokenAmountUsd = (token, amount, prices, currencies) => { export const convertTokenAmountUsd = (token, amount, prices, currencies) => {
if (!currencies) return null if (!currencies) return 0
const tokenLabel = getTokenLabel(token, currencies) const tokenLabel = getTokenLabel(token, currencies)
if (!amount || !token || !prices[tokenLabel]) return null if (!amount || !token || !prices[tokenLabel]) return 0
const rate = prices[tokenLabel]['USD'] const rate = prices[tokenLabel]['USD']
const formatted = formatter.format(rate * amount) const formatted = formatter.format(rate * amount)
return formatted return formatted