From e4a5f7ad766b04282f074e3510b7f4cc65c334c1 Mon Sep 17 00:00:00 2001
From: katspaugh <381895+katspaugh@users.noreply.github.com>
Date: Tue, 17 Dec 2024 08:11:53 +0100
Subject: [PATCH] Fix: signer vs plural signers
---
src/components/settings/RequiredConfirmations/index.tsx | 3 ++-
.../tx-flow/flows/RemoveOwner/ReviewRemoveOwner.tsx | 3 ++-
.../__snapshots__/SettingsChange.test.tsx.snap | 2 +-
.../tx/confirmation-views/SettingsChange/index.tsx | 6 +++++-
.../__snapshots__/ConfirmationView.test.tsx.snap | 2 +-
5 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/components/settings/RequiredConfirmations/index.tsx b/src/components/settings/RequiredConfirmations/index.tsx
index 3701aafa2f..88c17bb1a6 100644
--- a/src/components/settings/RequiredConfirmations/index.tsx
+++ b/src/components/settings/RequiredConfirmations/index.tsx
@@ -5,6 +5,7 @@ import { ChangeThresholdFlow } from '@/components/tx-flow/flows'
import CheckWallet from '@/components/common/CheckWallet'
import { useContext } from 'react'
import { TxModalContext } from '@/components/tx-flow'
+import { maybePlural } from '@/utils/formatters'
export const RequiredConfirmation = ({ threshold, owners }: { threshold: number; owners: number }) => {
const { setTxFlow } = useContext(TxModalContext)
@@ -43,7 +44,7 @@ export const RequiredConfirmation = ({ threshold, owners }: { threshold: number;
pr: 2,
}}
>
- {threshold} out of {owners} signers.
+ {threshold} out of {owners} signer{maybePlural(owners)}.
{owners > 1 && (
diff --git a/src/components/tx-flow/flows/RemoveOwner/ReviewRemoveOwner.tsx b/src/components/tx-flow/flows/RemoveOwner/ReviewRemoveOwner.tsx
index 4b15885928..101eed8bc8 100644
--- a/src/components/tx-flow/flows/RemoveOwner/ReviewRemoveOwner.tsx
+++ b/src/components/tx-flow/flows/RemoveOwner/ReviewRemoveOwner.tsx
@@ -14,6 +14,7 @@ import EthHashInfo from '@/components/common/EthHashInfo'
import commonCss from '@/components/tx-flow/common/styles.module.css'
import { ChangeSignerSetupWarning } from '@/features/multichain/components/SignerSetupWarning/ChangeSignerSetupWarning'
+import { maybePlural } from '@/utils/formatters'
export const ReviewRemoveOwner = ({ params }: { params: RemoveOwnerFlowProps }): ReactElement => {
const addressBook = useAddressBook()
@@ -55,7 +56,7 @@ export const ReviewRemoveOwner = ({ params }: { params: RemoveOwnerFlowProps }):
Any transaction requires the confirmation of: