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) {
console.log({projectId, goalToken, fundToken, amount, account})
if (fundToken === IS_ETH) {
return fundWithETH(projectId, goalToken)
.send({from: account, value: amount})

View File

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

View File

@ -40,9 +40,9 @@ const formatter = new Intl.NumberFormat('en-US', {
})
export const convertTokenAmountUsd = (token, amount, prices, currencies) => {
if (!currencies) return null
if (!currencies) return 0
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 formatted = formatter.format(rate * amount)
return formatted