Skip to content

Commit

Permalink
fix: do not offer executing unsigned txs with connected wallet (#4598)
Browse files Browse the repository at this point in the history
Co-authored-by: Aaron Cook <aaron@safe.global>
  • Loading branch information
schmanu and iamacook authored Dec 10, 2024
1 parent c3d7922 commit ac4de7a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/tx/SignOrExecuteForm/SignerForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ export const SignerForm = ({ willExecute }: { willExecute?: boolean }) => {
return []
}
const owners = new Set(nestedSafeOwners ?? [])
const isFullySigned = safeTx ? safeTx.signatures.size >= safe.threshold : false

if (willExecute || safe.owners.some((owner) => sameAddress(owner.value, wallet.address))) {
if ((willExecute && isFullySigned) || safe.owners.some((owner) => sameAddress(owner.value, wallet.address))) {
owners.add(wallet.address)
}

return Array.from(owners)
}, [nestedSafeOwners, safe.owners, wallet, willExecute])
}, [nestedSafeOwners, safe.owners, safe.threshold, safeTx, wallet, willExecute])

if (!wallet || !isNestedOwner) {
return null
Expand Down

0 comments on commit ac4de7a

Please sign in to comment.