fix: rework wallet screen
This commit is contained in:
parent
1f7ae74b42
commit
1f6d272aa0
103 changed files with 2094 additions and 3892 deletions
|
|
@ -4,7 +4,7 @@ import * as R from 'ramda'
|
|||
import React, { useState } from 'react'
|
||||
|
||||
import TitleSection from 'src/components/layout/TitleSection'
|
||||
import { fromServer, toServer } from 'src/utils/config'
|
||||
import { fromNamespace, toNamespace } from 'src/utils/config'
|
||||
|
||||
import Section from '../../components/layout/Section'
|
||||
|
||||
|
|
@ -49,19 +49,19 @@ const Notifications = ({ name: SCREEN_KEY }) => {
|
|||
onError: error => setError({ error })
|
||||
})
|
||||
|
||||
const config = data?.config && fromServer(SCREEN_KEY)(data.config)
|
||||
const config = data?.config && fromNamespace(SCREEN_KEY)(data.config)
|
||||
const machines = data?.machines
|
||||
const cryptoCurrencies = data?.cryptoCurrencies
|
||||
|
||||
// TODO check path when locales is finished
|
||||
const currency = R.path(['locales_currency'])(data?.config ?? {})
|
||||
// TODO improve the way of fetching this
|
||||
const currency = R.path(['locale_fiatCurrency', 'code'])(data?.config ?? {})
|
||||
|
||||
const save = (section, rawConfig) => {
|
||||
const config = toServer(SCREEN_KEY)(rawConfig)
|
||||
const save = R.curry((section, rawConfig) => {
|
||||
const config = toNamespace(SCREEN_KEY)(rawConfig)
|
||||
setSection(section)
|
||||
setError(null)
|
||||
return saveConfig({ variables: { config } })
|
||||
}
|
||||
})
|
||||
|
||||
const setEditing = (key, state) => {
|
||||
if (!state) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue