replace eth with weth for publishing
This commit is contained in:
parent
65daf01c35
commit
ec556141f7
|
@ -18,7 +18,18 @@ CurrencySelect.propTypes = {
|
||||||
showBalances: PropTypes.bool,
|
showBalances: PropTypes.bool,
|
||||||
enableToggles: PropTypes.bool,
|
enableToggles: PropTypes.bool,
|
||||||
className: PropTypes.string,
|
className: PropTypes.string,
|
||||||
InputProps: PropTypes.object
|
InputProps: PropTypes.object,
|
||||||
|
publishing: PropTypes.bool
|
||||||
|
}
|
||||||
|
|
||||||
|
const orderCurrencies = (currencies, publishing) => {
|
||||||
|
if (publishing) {
|
||||||
|
const temp = [...currencies]
|
||||||
|
let weth = currencies.findIndex(e => e.label === 'WETH')
|
||||||
|
temp[0] = temp[weth]
|
||||||
|
return temp.filter(e => e !== undefined)
|
||||||
|
}
|
||||||
|
return currencies
|
||||||
}
|
}
|
||||||
|
|
||||||
function CurrencySelect({
|
function CurrencySelect({
|
||||||
|
@ -30,7 +41,8 @@ function CurrencySelect({
|
||||||
showBalances,
|
showBalances,
|
||||||
enableToggles,
|
enableToggles,
|
||||||
className,
|
className,
|
||||||
InputProps
|
InputProps,
|
||||||
|
publishing
|
||||||
}) {
|
}) {
|
||||||
const context = useContext(FundingContext)
|
const context = useContext(FundingContext)
|
||||||
const { account } = context
|
const { account } = context
|
||||||
|
@ -87,7 +99,7 @@ function CurrencySelect({
|
||||||
onBlur={onBlur}
|
onBlur={onBlur}
|
||||||
value={value || ''}
|
value={value || ''}
|
||||||
>
|
>
|
||||||
{!!currencies && currencies.map((option, idx) => (
|
{!!currencies && orderCurrencies(currencies, publishing).map((option, idx) => (
|
||||||
<MenuItem style={{display: 'flex', alignItems: 'center'}} key={option.value} value={option.value}>
|
<MenuItem style={{display: 'flex', alignItems: 'center'}} key={option.value} value={option.value}>
|
||||||
<div style={{display: 'flex', alignItems: 'center'}}>
|
<div style={{display: 'flex', alignItems: 'center'}}>
|
||||||
{option.icon || <img
|
{option.icon || <img
|
||||||
|
|
|
@ -433,6 +433,7 @@ const SubmissionSection = ({ classes, history }) => {
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
onBlur={handleBlur}
|
onBlur={handleBlur}
|
||||||
value={values.goalToken}
|
value={values.goalToken}
|
||||||
|
publishing
|
||||||
/>
|
/>
|
||||||
<StatusTextField
|
<StatusTextField
|
||||||
className={classnames(classes.threeFourthWidth)}
|
className={classnames(classes.threeFourthWidth)}
|
||||||
|
|
Loading…
Reference in New Issue