Skip to content

Commit

Permalink
Merge branch 'main' into maintainers
Browse files Browse the repository at this point in the history
Signed-off-by: Enrique Lacal <[email protected]>
  • Loading branch information
EnriqueL8 authored Jul 11, 2024
2 parents 27b4356 + 9ebfaf2 commit 10df1b7
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 13 deletions.
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0

- @hyperledger/firefly-ui-maintainers

2 changes: 1 addition & 1 deletion MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The following is the list of current maintainers this repo:
| Alex Shorsher | shorsher | [email protected] | shorsher |
| Peter Broadhurst | peterbroadhurst | [email protected] | peterbroadhurst |
| Andrew Richardson | awrichar | [email protected] | Andrew.Richardson |
| David Echelberger | eberger727 | [email protected] | dech727 |
| David Echelberger | dechdev | [email protected] | dech727 |

This list is to be kept up to date as maintainers are added or removed.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ npm run start

- [YouTube Channel](https://www.youtube.com/playlist?list=PL0MZ85B_96CFVEdBNsHRoX_f15AJacZJD)
- Check out the architecture series
- [Architecture reference documentation](https://hyperledger.github.io/firefly/architecture/node_component_architecture.html)
- [Architecture reference documentation](https://hyperledger.github.io/firefly/latest/architecture/node_component_architecture)
- Join the discussion [on Discord](http://discord.gg/hyperledger)

## Git repositories
Expand All @@ -73,7 +73,7 @@ list is likely to grow as additional pluggable extensions come online in the com

Interested in contributing to the community?

Check out our [Contributor Guide](https://hyperledger.github.io/firefly/contributors/contributors.html), and welcome!
Check out our [Contributor Guide](https://hyperledger.github.io/firefly/latest/contributors/), and welcome!

Please adhere to this project's [Code of Conduct](CODE_OF_CONDUCT.md).

Expand Down
10 changes: 7 additions & 3 deletions src/components/Chips/PoolStatusChip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@

import { Chip } from '@mui/material';
import React from 'react';
import { ITokenPool, PoolStateColorMap } from '../../interfaces';
import {
ITokenPool,
PoolStateColorMap,
PoolStateString,
} from '../../interfaces';

interface Props {
pool: ITokenPool;
Expand All @@ -25,8 +29,8 @@ interface Props {
export const PoolStatusChip: React.FC<Props> = ({ pool }) => {
return (
<Chip
label={pool.state.toLocaleUpperCase()}
sx={{ backgroundColor: PoolStateColorMap[pool.state] }}
label={PoolStateString(pool.active)}
sx={{ backgroundColor: PoolStateColorMap(pool.active) }}
/>
);
};
2 changes: 1 addition & 1 deletion src/components/Lists/PoolList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const PoolList: React.FC<Props> = ({ pool }) => {
},
{
label: t('state'),
value: pool.state && <PoolStatusChip pool={pool} />,
value: <PoolStatusChip pool={pool} />,
},
{
label: t('created'),
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ export interface ITokenPool {
locator: string;
connector: string;
message: string;
state: 'confirmed' | 'pending';
active: boolean;
created: string;
tx?: ITx;
info?: any;
Expand Down
17 changes: 13 additions & 4 deletions src/interfaces/enums/transferTypes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import LocalFireDepartmentIcon from '@mui/icons-material/LocalFireDepartment';
import SwapHorizIcon from '@mui/icons-material/SwapHoriz';
import { IBlockchainCategory } from '.';
import { FFColors } from '../../theme';
import { t } from 'i18next';

export interface IHistTransferBucket {
[TransferCategoryEnum.MINT]: number;
Expand All @@ -37,10 +38,18 @@ export enum TransferCategoryEnum {
TRANSFER = 'Transfer',
}

export const PoolStateColorMap: { [key: string]: string } = {
unknown: FFColors.Red,
confirmed: FFColors.Purple,
pending: FFColors.Orange,
export const PoolStateColorMap = (active: boolean) => {
if (active) {
return FFColors.Purple;
}
return FFColors.Orange;
};

export const PoolStateString = (active: boolean) => {
if (active) {
return t('active');
}
return t('inactive');
};

export enum FF_TRANSFERS {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Tokens/views/Pools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const TokensPools: () => JSX.Element = () => {
t('standard'),
t('connector'),
t('locator'),
t('state'),
t('active'),
t('created'),
];
const tokenPoolRecords: IDataTableRecord[] | undefined = tokenPools?.map(
Expand Down
1 change: 1 addition & 0 deletions src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
"identityID": "Identity ID",
"identityUpdated": "Identity Updated",
"in": "In",
"inactive": "Inactive",
"info": "Info",
"input": "Input",
"inputOutputDetail": "Input, Output and Detail",
Expand Down

0 comments on commit 10df1b7

Please sign in to comment.