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) {
|
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})
|
||||||
|
|
|
@ -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',
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue