Skip to content

fix(web): say co-signer address when sending to a Safe owner - #8687

Open
Dev M (devtechedge) wants to merge 1 commit into
safe-global:devfrom
devtechedge:fix/8672-co-signer-address-copy
Open

fix(web): say co-signer address when sending to a Safe owner#8687
Dev M (devtechedge) wants to merge 1 commit into
safe-global:devfrom
devtechedge:fix/8672-co-signer-address-copy

Conversation

@devtechedge

Copy link
Copy Markdown

What it solves

Fixes #8672

When composing a send and the recipient is one of the Safe's owners (co-signers), but that address is not in the address book, the UI still shows:

This is an unknown address. You can add it to your address book.

That reads as if the address is a stranger. It is not - it is already a signer on this Safe. The reporter's wording is clearer: label it as a co-signer instead.

How this PR fixes it

In AddressBookInput, if the entered address is in safe.owners (via the existing isOwner helper) and is not already in the address book, the hint now says:

This is a co-signer address. You can add it to your address book.

Everyone else keeps the previous "unknown address" copy. The add-to-address-book CTA is unchanged either way, so you can still name a co-signer if you want.

No new APIs, flags, or shared-package changes - just a copy branch next to the existing unknown-address hint.

How to test it

  1. Open a Safe with at least one co-signer who is not in your address book.
  2. Start a send / token transfer and paste that co-signer's address as the recipient.
  3. Confirm the hint under the field says This is a co-signer address, and that "add it to your address book" still works.
  4. Paste a random unused address (also not in the book). Confirm it still says This is an unknown address.
  5. Add the co-signer to the address book and re-enter the address - the hint should disappear, same as today.

Unit coverage: AddressBookInput test that seeds safeInfo.owners and asserts the co-signer wording (and that "unknown" is not shown).

yarn workspace @safe-global/web test -- src/components/common/AddressBookInput/index.test.tsx

Affected flows

  • Send / token transfer recipient field when canAdd is true and the address is a Safe owner not yet in the address book.

Blast radius

  • AddressBookInput only (apps/web). Used by the token transfer recipient row and any other caller that passes canAdd.
  • Reads safe.owners through useSafeInfo + isOwner. No RTK Query, flags, persistence, or mobile shared-package changes.

Risks / not checked

  • Did not run the full web suite locally (deps not installed in this environment); relying on the new unit test + CI.
  • Did not verify mobile UI (web-only change).
  • Did not check Storybook visual snapshots for UnknownAddress (that story uses a non-owner address, so copy there should be unchanged).

Checklist

  • I've tested the branch on mobile - n/a, web-only
  • I've documented how it affects the analytics (if at all) - no analytics impact
  • I've written a unit/e2e test for it (if applicable) - unit test added
  • I've listed affected flows and blast radius, and named what I did not verify

CLA signature

With the submission of this Pull Request, I confirm that I have read and agree to the terms of the Contributor License Agreement.

When sending to a Safe owner who is not in the address book, show
"This is a co-signer address" instead of "This is an unknown address".

Fixes safe-global#8672
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"This is an unknown address" when sending to one of the co-signers should say "This is a co-signer address"

1 participant