Chore: put cryptoCodes from wallet function in new config manager
This commit is contained in:
parent
65a55a669d
commit
a521b679c4
4 changed files with 19 additions and 36 deletions
|
|
@ -149,7 +149,6 @@ const Locales = ({ name: SCREEN_KEY }) => {
|
|||
if (!coin) return setValue(curr)
|
||||
|
||||
const namespaced = fromNamespace(coin)(wallets)
|
||||
console.log(namespaced)
|
||||
if (!WalletSchema.isValidSync(namespaced)) {
|
||||
setOnChangeFunction(() => () => setValue(curr))
|
||||
setWizard(coin)
|
||||
|
|
@ -226,6 +225,7 @@ const Locales = ({ name: SCREEN_KEY }) => {
|
|||
accounts={accounts}
|
||||
accountsConfig={accountsConfig}
|
||||
locale={locale}
|
||||
zeroConfLimit={wallets[`${wizard}_zeroConfLimit`]}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ const Wallet = ({ name: SCREEN_KEY }) => {
|
|||
}
|
||||
|
||||
const config = data?.config && fromNamespace(SCREEN_KEY)(data.config)
|
||||
|
||||
const accountsConfig = data?.accountsConfig
|
||||
const cryptoCurrencies = data?.cryptoCurrencies ?? []
|
||||
const accounts = data?.accounts ?? []
|
||||
|
|
@ -95,7 +96,6 @@ const Wallet = ({ name: SCREEN_KEY }) => {
|
|||
setOnChangeFunction(null)
|
||||
return it
|
||||
})
|
||||
|
||||
return (
|
||||
<>
|
||||
<TitleSection title="Wallet Settings" />
|
||||
|
|
@ -124,6 +124,7 @@ const Wallet = ({ name: SCREEN_KEY }) => {
|
|||
accounts={accounts}
|
||||
accountsConfig={accountsConfig}
|
||||
locale={data?.config && fromNamespace('locale')(data.config)}
|
||||
zeroConfLimit={config[`${wizard}_zeroConfLimit`]}
|
||||
/>
|
||||
)}
|
||||
{editingSchema && (
|
||||
|
|
|
|||
|
|
@ -40,7 +40,8 @@ const Wizard = ({
|
|||
accounts,
|
||||
save,
|
||||
error,
|
||||
locale
|
||||
locale,
|
||||
zeroConfLimit
|
||||
}) => {
|
||||
const [{ step, config, accountsToSave }, setState] = useState({
|
||||
step: 0,
|
||||
|
|
@ -65,7 +66,7 @@ const Wizard = ({
|
|||
: accountsToSave
|
||||
|
||||
if (isLastStep) {
|
||||
newConfig.zeroConfLimit = 0
|
||||
newConfig.zeroConfLimit = zeroConfLimit || 0
|
||||
return save(toNamespace(coin.code, newConfig), newAccounts)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue