Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: display factory and mastercopy known names in create tx info #1365

Merged
merged 3 commits into from
Dec 19, 2022

Conversation

DiogoSoaress
Copy link
Member

@DiogoSoaress DiogoSoaress commented Dec 13, 2022

What it solves

Resolves #1347

How this PR fixes it

Passes mastercopy and factory known address names to the CreationTxInfo elements

How to test it

Expand a create tx info
(eth:0x92Db8FF884Fd2872888a61244FAEB1C50bf10cc3/transactions/history)

Screenshots

Screenshot 2022-12-13 at 18 37 47

Screenshot 2022-12-14 at 16 03 20

@DiogoSoaress DiogoSoaress changed the title fix: display factory and mastercopy known names in create tx details fix: display factory and mastercopy known names in create tx info Dec 13, 2022
@github-actions
Copy link

github-actions bot commented Dec 13, 2022

Branch preview

✅ Deploy successful!

https://fix_known_addr_safe_creation--webcore.review-web-core.5afe.dev

@github-actions
Copy link

github-actions bot commented Dec 13, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

Copy link
Member

@iamacook iamacook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure that these are "known addresses" on all networks? Afaiu, these need to have been manually named on the infra side.

@DiogoSoaress
Copy link
Member Author

Are you sure that these are "known addresses" on all networks? Afaiu, these need to have been manually named on the infra side.

If the name is not know by the transaction services, it will display the one from AB or none.
We follow the same logic in safe-react https://github.com/safe-global/safe-react/blob/abcc2e420423662a632ae6dc33e1616cdc94c132/src/routes/safe/components/Transactions/TxList/TxInfoCreation.tsx#L28-L53

@iamacook
Copy link
Member

If the name is not know by the transaction services, it will display the one from AB or none. We follow the same logic in safe-react https://github.com/safe-global/safe-react/blob/abcc2e420423662a632ae6dc33e1616cdc94c132/src/routes/safe/components/Transactions/TxList/TxInfoCreation.tsx#L28-L53

It won't show anything if there is no factory or implementation.

@DiogoSoaress
Copy link
Member Author

Are you sure that these are "known addresses" on all networks?

If they are not known (not answered by the services) we simply don't display the Address name. How do you think it should behave? From my tests across networks they are always present.

@iamacook
Copy link
Member

If they are not known (not answered by the services) we simply don't display the Address name. How do you think it should behave? From my tests across networks they are always present.

Your example from safe-react shows 'n/a' if no factory or implementation is returned. We're hiding them entirely.

Do we want to keep this logic and show the title with a pre-defined "empty state" or just hide them entirely? There is no design reference for this. cc @liliiaorlenko

@DiogoSoaress
Copy link
Member Author

I've added a case to handle missing factory / mastercopy txInfo
Screenshot 2022-12-14 at 16 03 20

mimics safe-react WDYT?

@iamacook
Copy link
Member

Verified that this works well with known addresses with the address provided in the description.

image

@katspaugh katspaugh merged commit 393171e into dev Dec 19, 2022
@katspaugh katspaugh deleted the fix-known-addr-safe-creation branch December 19, 2022 09:14
@gitpoap-bot
Copy link

gitpoap-bot bot commented Dec 19, 2022

Congrats, your important contribution to this open-source project has earned you a GitPOAP!

GitPOAP: 2022 Safe Web Core Contributor:

GitPOAP: 2022 Safe Web Core Contributor GitPOAP Badge

Head to gitpoap.io & connect your GitHub account to mint!

Learn more about GitPOAPs here.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Known addresses info lost on safe creation tx
3 participants