Merge pull request #1320 from chaotixkilla/fix-remove-coin-specific-unit-fields
Remove coin-specific cryptounits from config
This commit is contained in:
commit
1d0f3cd27c
4 changed files with 37 additions and 13 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import { utils as coinUtils } from '@lamassu/coins'
|
||||
import * as R from 'ramda'
|
||||
import React, { useState } from 'react'
|
||||
import * as Yup from 'yup'
|
||||
|
|
@ -104,14 +103,7 @@ const Wizard = ({
|
|||
: accountsToSave
|
||||
|
||||
if (isLastStep) {
|
||||
const defaultCryptoUnit = R.head(
|
||||
R.keys(coinUtils.getCryptoCurrency(coin.code).units)
|
||||
)
|
||||
const configToSave = {
|
||||
...newConfig,
|
||||
cryptoUnits: defaultCryptoUnit
|
||||
}
|
||||
return save(toNamespace(coin.code, configToSave), newAccounts)
|
||||
return save(toNamespace(coin.code, newConfig), newAccounts)
|
||||
}
|
||||
|
||||
setState({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue