Merge pull request #1766 from RafaelTaranto/fix/wallet-settings-exchange-saving
LAM-687 backport: load schemas
This commit is contained in:
commit
5383d29bf7
1 changed files with 13 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ import { SupportLinkButton } from 'src/components/buttons'
|
|||
import { NamespacedTable as EditableTable } from 'src/components/editableTable'
|
||||
import TitleSection from 'src/components/layout/TitleSection'
|
||||
import FormRenderer from 'src/pages/Services/FormRenderer'
|
||||
import schemas from 'src/pages/Services/schemas'
|
||||
import _schemas from 'src/pages/Services/schemas'
|
||||
import { ReactComponent as ReverseSettingsIcon } from 'src/styling/icons/circle buttons/settings/white.svg'
|
||||
import { ReactComponent as SettingsIcon } from 'src/styling/icons/circle buttons/settings/zodiac.svg'
|
||||
import { fromNamespace, toNamespace } from 'src/utils/config'
|
||||
|
|
@ -54,6 +54,12 @@ const GET_INFO = gql`
|
|||
}
|
||||
`
|
||||
|
||||
const GET_MARKETS = gql`
|
||||
query getMarkets {
|
||||
getMarkets
|
||||
}
|
||||
`
|
||||
|
||||
const LOCALE = 'locale'
|
||||
|
||||
const useStyles = makeStyles(styles)
|
||||
|
|
@ -71,6 +77,8 @@ const Wallet = ({ name: SCREEN_KEY }) => {
|
|||
refetchQueries: () => ['getData']
|
||||
})
|
||||
|
||||
const { data: marketsData } = useQuery(GET_MARKETS)
|
||||
|
||||
const [saveAccount] = useMutation(SAVE_ACCOUNT, {
|
||||
onCompleted: () => setEditingSchema(null),
|
||||
refetchQueries: () => ['getData']
|
||||
|
|
@ -89,6 +97,10 @@ const Wallet = ({ name: SCREEN_KEY }) => {
|
|||
const cryptoCurrencies = data?.cryptoCurrencies ?? []
|
||||
const accounts = data?.accounts ?? []
|
||||
|
||||
const markets = marketsData?.getMarkets
|
||||
|
||||
const schemas = _schemas(markets)
|
||||
|
||||
const onChange = (previous, current, setValue) => {
|
||||
if (!current) return setValue(current)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue