From 5688cb66758ab1418beebdd385409268ec297082 Mon Sep 17 00:00:00 2001 From: Barry Gitarts Date: Fri, 25 Oct 2019 15:27:45 -0400 Subject: [PATCH] cleanup token list --- src/components/projects/FundProject.jsx | 1 - src/utils/currencies.js | 14 ++++---------- src/utils/prices.js | 4 ++-- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/components/projects/FundProject.jsx b/src/components/projects/FundProject.jsx index ebb89bc..58800a7 100644 --- a/src/components/projects/FundProject.jsx +++ b/src/components/projects/FundProject.jsx @@ -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}) diff --git a/src/utils/currencies.js b/src/utils/currencies.js index fc85179..e0a45ff 100644 --- a/src/utils/currencies.js +++ b/src/utils/currencies.js @@ -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', diff --git a/src/utils/prices.js b/src/utils/prices.js index c7a8729..d0c3b8e 100644 --- a/src/utils/prices.js +++ b/src/utils/prices.js @@ -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