feat: omit 0conf columns at the end of the initial setup wizard

This commit is contained in:
André Sá 2022-03-08 18:10:41 +00:00
parent 2e3e050c54
commit b30c3b4d8c

View file

@ -70,6 +70,20 @@ const AllSet = ({ data: currentData, doContinue }) => {
return saveConfig({ variables: { config } }) return saveConfig({ variables: { config } })
} }
const presentableData = R.pipe(
R.omit(['coin', 'zeroConf', 'zeroConfLimit']),
toNamespace(coin)
)(currentData)
const presentableElements = R.filter(
R.pipe(
R.prop('name'),
R.flip(R.includes)(['zeroConf', 'zeroConfLimit']),
R.not()
),
getElements(cryptoCurrencies, accountsConfig, null, true)
)
return ( return (
<> <>
<H4 className={error && classes.error}>All set</H4> <H4 className={error && classes.error}>All set</H4>
@ -82,8 +96,8 @@ const AllSet = ({ data: currentData, doContinue }) => {
titleLg titleLg
name="All set" name="All set"
namespaces={[coin]} namespaces={[coin]}
data={toNamespace(coin, R.omit('coin', currentData))} data={presentableData}
elements={getElements(cryptoCurrencies, accountsConfig, true)} elements={presentableElements}
/> />
<Button size="lg" onClick={save} className={classes.button}> <Button size="lg" onClick={save} className={classes.button}>
Continue Continue