fix(web): say co-signer address when sending to a Safe owner - #8687
Open
Dev M (devtechedge) wants to merge 1 commit into
Open
fix(web): say co-signer address when sending to a Safe owner#8687Dev M (devtechedge) wants to merge 1 commit into
Dev M (devtechedge) wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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 insafe.owners(via the existingisOwnerhelper) and is not already in the address book, the hint now says: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
Unit coverage:
AddressBookInputtest that seedssafeInfo.ownersand asserts the co-signer wording (and that "unknown" is not shown).yarn workspace @safe-global/web test -- src/components/common/AddressBookInput/index.test.tsxAffected flows
canAddis true and the address is a Safe owner not yet in the address book.Blast radius
AddressBookInputonly (apps/web). Used by the token transfer recipient row and any other caller that passescanAdd.safe.ownersthroughuseSafeInfo+isOwner. No RTK Query, flags, persistence, or mobile shared-package changes.Risks / not checked
UnknownAddress(that story uses a non-owner address, so copy there should be unchanged).Checklist
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.