mirror of
https://github.com/status-im/liquid-funding.git
synced 2025-02-02 06:36:07 +00:00
clean up some misalignments
This commit is contained in:
parent
600c5119f6
commit
d0797caa69
@ -29,33 +29,33 @@ const CreateFunding = ({ refreshTable }) => (
|
|||||||
const toSend = donate(...args);
|
const toSend = donate(...args);
|
||||||
|
|
||||||
const estimateGas = await toSend.estimateGas();
|
const estimateGas = await toSend.estimateGas();
|
||||||
|
|
||||||
toSend.send({ from: account, gas: estimateGas + 2000 })
|
toSend.send({ from: account, gas: estimateGas + 2000 })
|
||||||
.then(res => {
|
.then(res => {
|
||||||
console.log({res})
|
console.log({res})
|
||||||
setStatus({
|
setStatus({
|
||||||
snackbar: { variant: 'success', message: 'funding provided!' }
|
snackbar: { variant: 'success', message: 'funding provided!' }
|
||||||
})
|
})
|
||||||
refreshTable()
|
refreshTable()
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
console.log({e})
|
console.log({e})
|
||||||
setStatus({
|
setStatus({
|
||||||
snackbar: { variant: 'error', message: 'There was an error' }
|
snackbar: { variant: 'error', message: 'There was an error' }
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({
|
{({
|
||||||
values,
|
values,
|
||||||
errors,
|
errors,
|
||||||
touched,
|
touched,
|
||||||
handleChange,
|
handleChange,
|
||||||
handleBlur,
|
handleBlur,
|
||||||
handleSubmit,
|
handleSubmit,
|
||||||
setFieldValue,
|
setFieldValue,
|
||||||
setStatus,
|
setStatus,
|
||||||
status
|
status
|
||||||
}) => (
|
}) => (
|
||||||
<form autoComplete="off" onSubmit={handleSubmit} style={{ display: 'flex', flexDirection: 'column' }}>
|
<form autoComplete="off" onSubmit={handleSubmit} style={{ display: 'flex', flexDirection: 'column' }}>
|
||||||
<TextField
|
<TextField
|
||||||
@ -95,11 +95,13 @@ const CreateFunding = ({ refreshTable }) => (
|
|||||||
>
|
>
|
||||||
{currencies.map(option => (
|
{currencies.map(option => (
|
||||||
<MenuItem style={{ display: 'flex', alignItems: 'center' }} key={option.value} value={option.value}>
|
<MenuItem style={{ display: 'flex', alignItems: 'center' }} key={option.value} value={option.value}>
|
||||||
{option.icon || <img
|
<div style={{ display: 'flex', alignItems: 'center' }} >
|
||||||
src={option.img || `${TOKEN_ICON_API}/${option.value}.png`}
|
{option.icon || <img
|
||||||
style={{ width: '3%', marginRight: '3%' }}
|
src={option.img || `${TOKEN_ICON_API}/${option.value}.png`}
|
||||||
/>}
|
style={{ width: option.width, marginRight: '3%' }}
|
||||||
{option.label}
|
/>}
|
||||||
|
{option.label}
|
||||||
|
</div>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
))}
|
))}
|
||||||
</TextField>
|
</TextField>
|
||||||
|
@ -8,7 +8,7 @@ import CreateFunding from './CreateFunding'
|
|||||||
|
|
||||||
const FundsManagement = ({ open }) => {
|
const FundsManagement = ({ open }) => {
|
||||||
const windowWidth = window.visualViewport.width
|
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'
|
const WebkitTransition = 'all 0.25s ease-out 0s'
|
||||||
return (
|
return (
|
||||||
<FundingContext.Consumer>
|
<FundingContext.Consumer>
|
||||||
|
@ -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_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_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 = [
|
export const currencies = [
|
||||||
{
|
{
|
||||||
value: 'ETH',
|
value: 'ETH',
|
||||||
label: 'Ether',
|
label: 'Ether',
|
||||||
img: `${TOKEN_COIN_API}/60.png`,
|
img: `${TOKEN_COIN_API}/60.png`,
|
||||||
|
width: '10%'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: SNT._address,
|
value: SNT._address,
|
||||||
@ -18,11 +20,8 @@ export const currencies = [
|
|||||||
{
|
{
|
||||||
value: '0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359',
|
value: '0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359',
|
||||||
label: 'DAI',
|
label: 'DAI',
|
||||||
},
|
img: `${TOKEN_API}/0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359.png`,
|
||||||
{
|
width: '10%'
|
||||||
value: StandardToken._address,
|
|
||||||
label: 'Standard Token',
|
|
||||||
icon: '🤔',
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user