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: redirect to old deployment for legacy Safes #1096

Merged
merged 6 commits into from
Nov 8, 2022
Merged

Conversation

iamacook
Copy link
Member

@iamacook iamacook commented Nov 8, 2022

What it solves

Notification link for legacy Safes

How this PR fixes it

Instead of linking to the CLI, we link to the upgrade page of the safe-react deployment for older Safes not supported by web-core.

How to test it

Open a <1.1.1 Safe and observe the new link in the notification.

Note: redirection on safe-react will still happen until we merge this.

@iamacook iamacook self-assigned this Nov 8, 2022
@iamacook iamacook requested a review from DiogoSoaress November 8, 2022 09:57
@iamacook iamacook linked an issue Nov 8, 2022 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented Nov 8, 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

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 8, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3af7c7d
Status: ✅  Deploy successful!
Preview URL: https://d19ea1dd.web-core.pages.dev
Branch Preview URL: https://update-redirect.web-core.pages.dev

View logs

@@ -37,6 +39,7 @@ describe('useSafeNotifications', () => {
implementation: { value: '0x123' },
implementationVersionState: 'OUTDATED',
version: '1.1.1',
chainId: '1',
Copy link
Member

Choose a reason for hiding this comment

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

I think it's a leftover

href: {
link: {
href: isOldSafe
? `https://gnosis-safe.io/app/${chain?.shortName}:${safeAddress}/settings/details?no-redirect=true`
Copy link
Member

Choose a reason for hiding this comment

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

Please make the old URL a constant. The safe query param can be taken from the router instead of concatenating chainId and safeAddress.

@iamacook iamacook requested a review from katspaugh November 8, 2022 11:37
}),
)

return () => {
dispatch(closeNotification({ id }))
}
}, [dispatch, implementationVersionState, version, query.safe])
}, [dispatch, implementationVersionState, version, query.safe, safeAddress])
Copy link
Member

Choose a reason for hiding this comment

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

safeAddress can be removed now.

@iamacook iamacook requested a review from katspaugh November 8, 2022 12:09
Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

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

👍

@katspaugh
Copy link
Member

Tested, and it works. ✅

@katspaugh katspaugh merged commit 61cbc36 into dev Nov 8, 2022
@katspaugh katspaugh deleted the update-redirect branch November 8, 2022 13:05
@katspaugh katspaugh mentioned this pull request Nov 8, 2022
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.

Prompt to redirect 1.0.0 Safes to the old app
3 participants