feat: open configuration popup when selecting a non-configured third

party service on the wallets page
This commit is contained in:
Liordino Neto 2020-10-23 22:07:42 -03:00 committed by Josh Harvey
parent e822737af6
commit 7576934109
2 changed files with 61 additions and 6 deletions

View file

@ -13,7 +13,12 @@ const WalletSchema = Yup.object().shape({
zeroConf: Yup.string().required('Required')
})
const getElements = (cryptoCurrencies, accounts, wizard = false) => {
const getElements = (
cryptoCurrencies,
accounts,
enableThirdPartyService,
wizard = false
) => {
const widthAdjust = wizard ? 11 : 0
const viewCryptoCurrency = it =>
R.compose(
@ -33,6 +38,8 @@ const getElements = (cryptoCurrencies, accounts, wizard = false) => {
filterCoins(it)(filterOptions(option))
)
const onChange = (prev, curr) => enableThirdPartyService(curr)
return [
{
name: 'id',
@ -53,7 +60,8 @@ const getElements = (cryptoCurrencies, accounts, wizard = false) => {
options: getOptions('ticker'),
valueProp: 'code',
getLabel: R.path(['display']),
optionsLimit: null
optionsLimit: null,
onChange
}
},
{
@ -67,7 +75,8 @@ const getElements = (cryptoCurrencies, accounts, wizard = false) => {
options: getOptions('wallet'),
valueProp: 'code',
getLabel: R.path(['display']),
optionsLimit: null
optionsLimit: null,
onChange
}
},
{
@ -81,7 +90,8 @@ const getElements = (cryptoCurrencies, accounts, wizard = false) => {
options: getOptions('exchange'),
valueProp: 'code',
getLabel: R.path(['display']),
optionsLimit: null
optionsLimit: null,
onChange
}
},
{
@ -95,7 +105,8 @@ const getElements = (cryptoCurrencies, accounts, wizard = false) => {
options: getOptions('zeroConf'),
valueProp: 'code',
getLabel: R.path(['display']),
optionsLimit: null
optionsLimit: null,
onChange
}
}
]