From ee8a8cfbeba39ab9c6406ba576a8ebd10f0e4f89 Mon Sep 17 00:00:00 2001 From: Jan-Felix Date: Fri, 31 May 2024 12:01:02 +0200 Subject: [PATCH] adjust copy --- .../tx/SignOrExecuteForm/PermissionsCheck.tsx | 11 ++++++----- .../__tests__/PermissionsCheck.test.tsx | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/components/tx/SignOrExecuteForm/PermissionsCheck.tsx b/src/components/tx/SignOrExecuteForm/PermissionsCheck.tsx index 673785ece4..3ba5709429 100644 --- a/src/components/tx/SignOrExecuteForm/PermissionsCheck.tsx +++ b/src/components/tx/SignOrExecuteForm/PermissionsCheck.tsx @@ -151,12 +151,13 @@ const PermissionsCheck: React.FC<{ onSubmit?: SubmitCallback; safeTx: SafeTransa return ( - Execute through role + Execute without confirmations {allowingRole && ( <> - As a member of the {allowingRole.roleKey} role you can execute this transaction immediately. + As a member of the {allowingRole.roleKey} you can execute this transaction immediately without + confirmations from other owners. - The permissions check fails with the following status: + The permission check fails with the following status:
{Status[mostLikelyRole.status]} @@ -215,7 +216,7 @@ const PermissionsCheck: React.FC<{ onSubmit?: SubmitCallback; safeTx: SafeTransa disabled={!isOk || !allowingRole || isPending} sx={{ minWidth: '209px' }} > - {isPending ? : 'Execute through role'} + {isPending ? : 'Execute'} )} @@ -311,7 +312,7 @@ const useRoles = (metaTx?: MetaTransactionData) => { } /** - * Returns the status of the permissions check, `null` if it depends on the condition evaluation. + * Returns the status of the permission check, `null` if it depends on the condition evaluation. */ const checkTransaction = (role: RoleSummary, metaTx: MetaTransactionData): Status | null => { const target = role.targets.find((t) => t.address === metaTx.to.toLowerCase()) diff --git a/src/components/tx/SignOrExecuteForm/__tests__/PermissionsCheck.test.tsx b/src/components/tx/SignOrExecuteForm/__tests__/PermissionsCheck.test.tsx index a6604b0406..5929654424 100644 --- a/src/components/tx/SignOrExecuteForm/__tests__/PermissionsCheck.test.tsx +++ b/src/components/tx/SignOrExecuteForm/__tests__/PermissionsCheck.test.tsx @@ -117,7 +117,7 @@ describe('PermissionsCheck', () => { }) // the card is not shown - expect(queryByText('Execute through role')).not.toBeInTheDocument() + expect(queryByText('Execute without confirmations')).not.toBeInTheDocument() }) it('disables the submit button when the call is not allowed and shows the permission check status', async () => { @@ -131,7 +131,7 @@ describe('PermissionsCheck', () => { }) const { findByText, getByText } = render() - expect(await findByText('Execute through role', { selector: 'button' })).toBeDisabled() + expect(await findByText('Execute')).toBeDisabled() expect( getByText( @@ -156,7 +156,7 @@ describe('PermissionsCheck', () => { const { findByText } = render() - fireEvent.click(await findByText('Execute through role', { selector: 'button' })) + fireEvent.click(await findByText('Execute')) await waitFor(() => { expect(executeSpy).toHaveBeenCalledWith(