File tree Expand file tree Collapse file tree 6 files changed +24
-10
lines changed Expand file tree Collapse file tree 6 files changed +24
-10
lines changed Original file line number Diff line number Diff line change 1616
1717import { Chip } from '@mui/material' ;
1818import React from 'react' ;
19- import { ITokenPool , PoolStateColorMap } from '../../interfaces' ;
19+ import {
20+ ITokenPool ,
21+ PoolStateColorMap ,
22+ PoolStateString ,
23+ } from '../../interfaces' ;
2024
2125interface Props {
2226 pool : ITokenPool ;
@@ -25,8 +29,8 @@ interface Props {
2529export const PoolStatusChip : React . FC < Props > = ( { pool } ) => {
2630 return (
2731 < Chip
28- label = { pool . state . toLocaleUpperCase ( ) }
29- sx = { { backgroundColor : PoolStateColorMap [ pool . state ] } }
32+ label = { PoolStateString ( pool . active ) }
33+ sx = { { backgroundColor : PoolStateColorMap ( pool . active ) } }
3034 />
3135 ) ;
3236} ;
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ export const PoolList: React.FC<Props> = ({ pool }) => {
9797 } ,
9898 {
9999 label : t ( 'state' ) ,
100- value : pool . state && < PoolStatusChip pool = { pool } /> ,
100+ value : < PoolStatusChip pool = { pool } /> ,
101101 } ,
102102 {
103103 label : t ( 'created' ) ,
Original file line number Diff line number Diff line change @@ -551,7 +551,7 @@ export interface ITokenPool {
551551 locator : string ;
552552 connector : string ;
553553 message : string ;
554- state : 'confirmed' | 'pending' ;
554+ active : boolean ;
555555 created : string ;
556556 tx ?: ITx ;
557557 info ?: any ;
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import LocalFireDepartmentIcon from '@mui/icons-material/LocalFireDepartment';
1919import SwapHorizIcon from '@mui/icons-material/SwapHoriz' ;
2020import { IBlockchainCategory } from '.' ;
2121import { FFColors } from '../../theme' ;
22+ import { t } from 'i18next' ;
2223
2324export interface IHistTransferBucket {
2425 [ TransferCategoryEnum . MINT ] : number ;
@@ -37,10 +38,18 @@ export enum TransferCategoryEnum {
3738 TRANSFER = 'Transfer' ,
3839}
3940
40- export const PoolStateColorMap : { [ key : string ] : string } = {
41- unknown : FFColors . Red ,
42- confirmed : FFColors . Purple ,
43- pending : FFColors . Orange ,
41+ export const PoolStateColorMap = ( active : boolean ) => {
42+ if ( active ) {
43+ return FFColors . Purple ;
44+ }
45+ return FFColors . Orange ;
46+ } ;
47+
48+ export const PoolStateString = ( active : boolean ) => {
49+ if ( active ) {
50+ return t ( 'active' ) ;
51+ }
52+ return t ( 'inactive' ) ;
4453} ;
4554
4655export enum FF_TRANSFERS {
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ export const TokensPools: () => JSX.Element = () => {
9898 t ( 'standard' ) ,
9999 t ( 'connector' ) ,
100100 t ( 'locator' ) ,
101- t ( 'state ' ) ,
101+ t ( 'active ' ) ,
102102 t ( 'created' ) ,
103103 ] ;
104104 const tokenPoolRecords : IDataTableRecord [ ] | undefined = tokenPools ?. map (
Original file line number Diff line number Diff line change 141141 "identityID" : " Identity ID" ,
142142 "identityUpdated" : " Identity Updated" ,
143143 "in" : " In" ,
144+ "inactive" : " Inactive" ,
144145 "info" : " Info" ,
145146 "input" : " Input" ,
146147 "inputOutputDetail" : " Input, Output and Detail" ,
You can’t perform that action at this time.
0 commit comments