cleanup token list
This commit is contained in:
parent
d5438326c7
commit
5688cb6675
|
@ -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})
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue