Feat: move zeroConfLimit to wallet_CRYPTOCODE namespace

This commit is contained in:
csrapr 2021-04-07 18:50:19 +01:00 committed by Josh Harvey
parent 4681de4033
commit 5da28bc830
10 changed files with 178 additions and 119 deletions

View file

@ -1,16 +1,22 @@
import * as R from 'ramda'
import * as Yup from 'yup'
import { NumberInput } from 'src/components/inputs/formik'
import Autocomplete from 'src/components/inputs/formik/Autocomplete.js'
const filterClass = type => R.filter(it => it.class === type)
const filterCoins = ({ id }) => R.filter(it => R.contains(id)(it.cryptos))
const currencyMax = 999999999
const WalletSchema = Yup.object().shape({
ticker: Yup.string().required(),
wallet: Yup.string().required(),
exchange: Yup.string().required(),
zeroConf: Yup.string().required()
zeroConf: Yup.string().required(),
zeroConfLimit: Yup.number()
.integer()
.required()
.min(0)
.max(currencyMax)
})
const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => {
@ -100,6 +106,17 @@ const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => {
optionsLimit: null,
onChange
}
},
{
name: 'zeroConfLimit',
size: 'sm',
stripe: true,
view: it => it,
input: NumberInput,
width: 190 - widthAdjust,
inputProps: {
decimalPlaces: 0
}
}
]
}