Merge pull request #1658 from RafaelTaranto/chore/ln-beta-status-on-admin-ui
LAM-1070 chore: beta status on LN
This commit is contained in:
commit
20e57de235
6 changed files with 15 additions and 5 deletions
|
|
@ -32,10 +32,12 @@ const mapLanguage = lang => {
|
|||
}
|
||||
|
||||
const massageCryptos = cryptos => {
|
||||
const betaList = ['LN']
|
||||
const convert = crypto => ({
|
||||
code: crypto['cryptoCode'],
|
||||
display: crypto['display'],
|
||||
codeDisplay: crypto['cryptoCodeDisplay'] ?? crypto['cryptoCode']
|
||||
codeDisplay: crypto['cryptoCodeDisplay'] ?? crypto['cryptoCode'],
|
||||
isBeta: betaList.includes(crypto.cryptoCode)
|
||||
})
|
||||
|
||||
return _.map(convert, cryptos)
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ const typeDef = gql`
|
|||
code: String!
|
||||
display: String!
|
||||
codeDisplay: String!
|
||||
isBeta: Boolean
|
||||
}
|
||||
|
||||
type Query {
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ const GET_DATA = gql`
|
|||
cryptoCurrencies {
|
||||
code
|
||||
display
|
||||
isBeta
|
||||
}
|
||||
languages {
|
||||
code
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ const allFields = (getData, onChange, auxElements = []) => {
|
|||
if (!data) return ''
|
||||
|
||||
return R.compose(
|
||||
R.prop(code),
|
||||
it => `${R.prop(code)(it)} ${it?.isBeta ? '(Beta)' : ''}`,
|
||||
R.find(R.propEq(compare ?? 'code', it))
|
||||
)(data)
|
||||
}
|
||||
|
|
@ -36,7 +36,12 @@ const allFields = (getData, onChange, auxElements = []) => {
|
|||
const countryData = getData(['countries'])
|
||||
const currencyData = getData(['currencies'])
|
||||
const languageData = getData(['languages'])
|
||||
const cryptoData = getData(['cryptoCurrencies'])
|
||||
const rawCryptoData = getData(['cryptoCurrencies'])
|
||||
const cryptoData = rawCryptoData?.map(it => {
|
||||
it.codeLabel = `${it.code}${it.isBeta ? ' (Beta)' : ''}`
|
||||
return it
|
||||
})
|
||||
|
||||
const timezonesData = timezoneList
|
||||
|
||||
const findSuggestion = it => {
|
||||
|
|
@ -104,7 +109,7 @@ const allFields = (getData, onChange, auxElements = []) => {
|
|||
inputProps: {
|
||||
options: cryptoData,
|
||||
valueProp: 'code',
|
||||
labelProp: 'code',
|
||||
labelProp: 'codeLabel',
|
||||
multiple: true,
|
||||
optionsLimit: null,
|
||||
onChange
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ const GET_INFO = gql`
|
|||
cryptoCurrencies {
|
||||
code
|
||||
display
|
||||
isBeta
|
||||
}
|
||||
}
|
||||
`
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => {
|
|||
const widthAdjust = wizard ? 11 : 0
|
||||
const viewCryptoCurrency = it => {
|
||||
const currencyDisplay = R.compose(
|
||||
R.prop(['display']),
|
||||
it => `${R.prop(['display'])(it)} ${it.isBeta ? '(Beta)' : ''}`,
|
||||
R.find(R.propEq('code', it))
|
||||
)(cryptoCurrencies)
|
||||
return currencyDisplay
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue