From d0797caa69fa158ae8e98549c75a03b76755a4ce Mon Sep 17 00:00:00 2001 From: Barry Gitarts Date: Wed, 6 Feb 2019 14:33:08 -0500 Subject: [PATCH] clean up some misalignments --- app/components/CreateFunding.jsx | 58 +++++++++++++++--------------- app/components/FundsManagement.jsx | 2 +- app/utils/currencies.js | 9 +++-- 3 files changed, 35 insertions(+), 34 deletions(-) diff --git a/app/components/CreateFunding.jsx b/app/components/CreateFunding.jsx index 35fa024..db64ee1 100644 --- a/app/components/CreateFunding.jsx +++ b/app/components/CreateFunding.jsx @@ -29,33 +29,33 @@ const CreateFunding = ({ refreshTable }) => ( const toSend = donate(...args); const estimateGas = await toSend.estimateGas(); - + toSend.send({ from: account, gas: estimateGas + 2000 }) - .then(res => { - console.log({res}) - setStatus({ - snackbar: { variant: 'success', message: 'funding provided!' } - }) - refreshTable() - }) - .catch(e => { - console.log({e}) - setStatus({ - snackbar: { variant: 'error', message: 'There was an error' } - }) - }) + .then(res => { + console.log({res}) + setStatus({ + snackbar: { variant: 'success', message: 'funding provided!' } + }) + refreshTable() + }) + .catch(e => { + console.log({e}) + setStatus({ + snackbar: { variant: 'error', message: 'There was an error' } + }) + }) }} > {({ - values, - errors, - touched, - handleChange, - handleBlur, - handleSubmit, - setFieldValue, - setStatus, - status + values, + errors, + touched, + handleChange, + handleBlur, + handleSubmit, + setFieldValue, + setStatus, + status }) => (
( > {currencies.map(option => ( - {option.icon || } - {option.label} +
+ {option.icon || } + {option.label} +
))}
diff --git a/app/components/FundsManagement.jsx b/app/components/FundsManagement.jsx index 5b0ad10..b4a049b 100644 --- a/app/components/FundsManagement.jsx +++ b/app/components/FundsManagement.jsx @@ -8,7 +8,7 @@ import CreateFunding from './CreateFunding' const FundsManagement = ({ open }) => { const windowWidth = window.visualViewport.width - const maxWidth = open ? `${windowWidth * 0.80}px` : '100vw' + const maxWidth = open ? `${windowWidth * 0.80}px` : '90vw' const WebkitTransition = 'all 0.25s ease-out 0s' return ( diff --git a/app/utils/currencies.js b/app/utils/currencies.js index 0477951..f2b7295 100644 --- a/app/utils/currencies.js +++ b/app/utils/currencies.js @@ -4,11 +4,13 @@ import sntIco from 'cryptocurrency-icons/svg/color/snt.svg' export const TOKEN_ICON_API = 'https://raw.githubusercontent.com/TrustWallet/tokens/master/images' export const TOKEN_COIN_API = 'https://raw.githubusercontent.com/TrustWallet/tokens/master/coins' +export const TOKEN_API = 'https://raw.githubusercontent.com/TrustWallet/tokens/master/tokens' export const currencies = [ { value: 'ETH', label: 'Ether', img: `${TOKEN_COIN_API}/60.png`, + width: '10%' }, { value: SNT._address, @@ -18,11 +20,8 @@ export const currencies = [ { value: '0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359', label: 'DAI', - }, - { - value: StandardToken._address, - label: 'Standard Token', - icon: '🤔', + img: `${TOKEN_API}/0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359.png`, + width: '10%' } ]