feat: add transaction batching option to advanced wallet settings
This commit is contained in:
parent
2da14d64b3
commit
68d9d95dfa
12 changed files with 25 additions and 74 deletions
|
|
@ -1,8 +1,11 @@
|
|||
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'
|
||||
import {
|
||||
Autocomplete,
|
||||
Checkbox,
|
||||
NumberInput
|
||||
} from 'src/components/inputs/formik'
|
||||
import { disabledColor } from 'src/styling/variables'
|
||||
import { CURRENCY_MAX } from 'src/utils/constants'
|
||||
import { transformNumber } from 'src/utils/number'
|
||||
|
|
@ -29,10 +32,11 @@ const WalletSchema = Yup.object().shape({
|
|||
})
|
||||
|
||||
const AdvancedWalletSchema = Yup.object().shape({
|
||||
cryptoUnits: Yup.string().required()
|
||||
cryptoUnits: Yup.string().required(),
|
||||
allowTransactionBatching: Yup.boolean().required()
|
||||
})
|
||||
|
||||
const getAdvancedWalletElements = (cryptoCurrencies, coinUtils) => {
|
||||
const getAdvancedWalletElements = (cryptoCurrencies, coinUtils, config) => {
|
||||
const viewCryptoCurrency = it =>
|
||||
R.compose(
|
||||
R.prop(['display']),
|
||||
|
|
@ -66,6 +70,15 @@ const getAdvancedWalletElements = (cryptoCurrencies, coinUtils) => {
|
|||
valueProp: 'code',
|
||||
labelProp: 'display'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'allowTransactionBatching',
|
||||
size: 'sm',
|
||||
stripe: true,
|
||||
width: 250,
|
||||
view: (_, ite) =>
|
||||
config[`${ite.id}_allowTransactionBatching`] ? 'Yes' : 'No',
|
||||
input: Checkbox
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue