From 7a0df008a47ad0420b9d2a604f35b4aefff98def Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harrison=20Mendon=C3=A7a?= Date: Thu, 22 Aug 2024 10:35:47 -0300 Subject: [PATCH] feat: resolve forceBalanceDisplay warning (#1036) --- apps/namadillo/src/App/Common/NamCurrency.tsx | 2 +- apps/namadillo/src/App/Common/TransactionFees.tsx | 6 +----- .../src/App/Governance/ProposalStatusSummary.tsx | 2 +- apps/namadillo/src/App/Governance/VoteInfoCards.tsx | 8 +++----- apps/namadillo/src/App/Staking/AllValidatorsTable.tsx | 5 +---- apps/namadillo/src/App/Staking/IncrementBondingTable.tsx | 5 +---- apps/namadillo/src/App/Staking/MyValidatorsTable.tsx | 5 +---- apps/namadillo/src/App/Staking/ReDelegateTable.tsx | 5 +---- apps/namadillo/src/App/Staking/UnstakeBondingTable.tsx | 5 +---- packages/config/eslint/react.js | 1 + 10 files changed, 12 insertions(+), 32 deletions(-) diff --git a/apps/namadillo/src/App/Common/NamCurrency.tsx b/apps/namadillo/src/App/Common/NamCurrency.tsx index ea5598d2b..d6ff2df22 100644 --- a/apps/namadillo/src/App/Common/NamCurrency.tsx +++ b/apps/namadillo/src/App/Common/NamCurrency.tsx @@ -3,7 +3,7 @@ import { Currency, CurrencyProps } from "@namada/components"; type NamCurrencyProps = Omit< CurrencyProps, "currency" | "currencyPosition" | "spaceAroundSign" -> & { forceBalanceDisplay?: boolean }; +>; export const NamCurrency = ({ ...props }: NamCurrencyProps): JSX.Element => { return ( diff --git a/apps/namadillo/src/App/Common/TransactionFees.tsx b/apps/namadillo/src/App/Common/TransactionFees.tsx index 6369d27bf..72df9c05d 100644 --- a/apps/namadillo/src/App/Common/TransactionFees.tsx +++ b/apps/namadillo/src/App/Common/TransactionFees.tsx @@ -18,11 +18,7 @@ export const TransactionFees = ({ return (
Transaction fee:{" "} - +
); }; diff --git a/apps/namadillo/src/App/Governance/ProposalStatusSummary.tsx b/apps/namadillo/src/App/Governance/ProposalStatusSummary.tsx index 9ed3e3d6c..5b51f2473 100644 --- a/apps/namadillo/src/App/Governance/ProposalStatusSummary.tsx +++ b/apps/namadillo/src/App/Governance/ProposalStatusSummary.tsx @@ -222,7 +222,7 @@ const Loaded: React.FC<{ }; const formattedAmount = (voteType: VoteType): React.ReactNode => ( - + ); const amounts = { diff --git a/apps/namadillo/src/App/Governance/VoteInfoCards.tsx b/apps/namadillo/src/App/Governance/VoteInfoCards.tsx index be474c085..4768770a1 100644 --- a/apps/namadillo/src/App/Governance/VoteInfoCards.tsx +++ b/apps/namadillo/src/App/Governance/VoteInfoCards.tsx @@ -55,8 +55,7 @@ const PgfPaymentInfoCards: React.FC<{ content={pgfActions.continuous.add.map( ({ internal: { amount, target } }) => ( - {target}{" "} - + {target} ) )} @@ -67,8 +66,7 @@ const PgfPaymentInfoCards: React.FC<{ content={pgfActions.continuous.remove.map( ({ internal: { amount, target } }) => ( - {target}{" "} - + {target} ) )} @@ -78,7 +76,7 @@ const PgfPaymentInfoCards: React.FC<{ className="col-span-full" content={pgfActions.retro.map(({ internal: { amount, target } }) => ( - {target} + {target} ))} /> diff --git a/apps/namadillo/src/App/Staking/AllValidatorsTable.tsx b/apps/namadillo/src/App/Staking/AllValidatorsTable.tsx index 5ab6fd2ef..3b89ac9fd 100644 --- a/apps/namadillo/src/App/Staking/AllValidatorsTable.tsx +++ b/apps/namadillo/src/App/Staking/AllValidatorsTable.tsx @@ -88,10 +88,7 @@ export const AllValidatorsTable = ({ key={`validator-voting-power-${validator.address}`} > {validator.votingPowerInNAM && ( - + )} {formatPercentage(BigNumber(validator.votingPowerPercentage || 0))} diff --git a/apps/namadillo/src/App/Staking/IncrementBondingTable.tsx b/apps/namadillo/src/App/Staking/IncrementBondingTable.tsx index 5183b639b..2c539b55b 100644 --- a/apps/namadillo/src/App/Staking/IncrementBondingTable.tsx +++ b/apps/namadillo/src/App/Staking/IncrementBondingTable.tsx @@ -122,10 +122,7 @@ export const IncrementBondingTable = ({ key={`validator-voting-power-${validator.address}`} > {validator.votingPowerInNAM && ( - + )} {formatPercentage(BigNumber(validator.votingPowerPercentage || 0))} diff --git a/apps/namadillo/src/App/Staking/MyValidatorsTable.tsx b/apps/namadillo/src/App/Staking/MyValidatorsTable.tsx index 230c64759..8bc6ea9cf 100644 --- a/apps/namadillo/src/App/Staking/MyValidatorsTable.tsx +++ b/apps/namadillo/src/App/Staking/MyValidatorsTable.tsx @@ -85,10 +85,7 @@ export const MyValidatorsTable = (): JSX.Element => { key={`my-validator-voting-power-${validator.address}`} > {validator.votingPowerInNAM && ( - + )} {formatPercentage(BigNumber(validator.votingPowerPercentage || 0))} diff --git a/apps/namadillo/src/App/Staking/ReDelegateTable.tsx b/apps/namadillo/src/App/Staking/ReDelegateTable.tsx index d3c2e11b5..36507a2c6 100644 --- a/apps/namadillo/src/App/Staking/ReDelegateTable.tsx +++ b/apps/namadillo/src/App/Staking/ReDelegateTable.tsx @@ -118,10 +118,7 @@ export const ReDelegateTable = ({ key={`validator-voting-power-${validator.address}`} > {validator.votingPowerInNAM && ( - + )} {formatPercentage(BigNumber(validator.votingPowerPercentage || 0))} diff --git a/apps/namadillo/src/App/Staking/UnstakeBondingTable.tsx b/apps/namadillo/src/App/Staking/UnstakeBondingTable.tsx index 1d749e5a4..12251777b 100644 --- a/apps/namadillo/src/App/Staking/UnstakeBondingTable.tsx +++ b/apps/namadillo/src/App/Staking/UnstakeBondingTable.tsx @@ -134,10 +134,7 @@ export const UnstakeBondingTable = ({ key={`validator-voting-power-${validator.address}`} > {validator.votingPowerInNAM && ( - + )} {formatPercentage(BigNumber(validator.votingPowerPercentage || 0))} diff --git a/packages/config/eslint/react.js b/packages/config/eslint/react.js index 91bba2367..7b00776ed 100644 --- a/packages/config/eslint/react.js +++ b/packages/config/eslint/react.js @@ -33,6 +33,7 @@ module.exports = { varsIgnorePattern: "^_", caughtErrorsIgnorePattern: "^_", args: "all", + ignoreRestSiblings: true, }, ], "max-len": [