Skip to content
This repository was archived by the owner on Nov 10, 2023. It is now read-only.

Conversation

@katspaugh
Copy link
Member

@katspaugh katspaugh commented Jan 14, 2022

What it solves

Resolves #3200

How this PR fixes it

  • Renames XDAI to GNOSIS_CHAIN in the CHAIN_ID enum
  • Adds a redirect from /app/xdai:0x... to /app/gno:0x...
  • Adjusts setChainFromUrl so that any redirects happen only from the router
  • Updates /app/xdai to redirect to /app/gno
  • Adds all shortNames as 'root' routes that set the chainId on app load

How to test it

  • Switch the CGW toggle to prod
  • Open some Gnosis Chain Safe
  • Try replacing gno with xdai in the URL – it should redirect back to gno

@katspaugh katspaugh requested a review from iamacook January 14, 2022 12:00
@github-actions
Copy link

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link

github-actions bot commented Jan 14, 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 3 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@coveralls
Copy link

coveralls commented Jan 14, 2022

Pull Request Test Coverage Report for Build 1708457794

  • 9 of 14 (64.29%) changed or added relevant lines in 4 files are covered.
  • 437 unchanged lines in 24 files lost coverage.
  • Overall coverage increased (+0.04%) to 32.483%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/routes/routes.ts 1 2 50.0%
src/routes/index.tsx 0 4 0.0%
Files with Coverage Reduction New Missed Lines %
src/components/ReviewInfoText/index.tsx 2 84.44%
src/components/TransactionsFees/index.tsx 2 83.33%
src/routes/safe/components/Transactions/TxList/modals/ApproveTxModal.tsx 2 2.76%
src/routes/safe/components/Apps/components/AppCard/index.stories.tsx 3 0%
src/routes/safe/components/Balances/SendModal/screens/ContractInteraction/ReviewCustomTx/index.tsx 9 0%
src/routes/safe/components/Settings/UpdateSafeModal/index.tsx 10 0%
src/routes/safe/components/Transactions/TxList/modals/RejectTxModal.tsx 10 3.45%
src/logic/safe/transactions/gas.ts 11 17.31%
src/routes/safe/components/Settings/Advanced/RemoveGuardModal.tsx 12 34.55%
src/routes/safe/components/Apps/components/ConfirmTxModal/ReviewConfirm.tsx 13 60.82%
Totals Coverage Status
Change from base Build 1696744828: 0.04%
Covered Lines: 3160
Relevant Lines: 8680

💛 - Coveralls

@github-actions
Copy link

Deployment links

🟠 Safe Rinkeby Safe Mainnet 🟣 Safe Polygon 🟡 Safe BSC Safe Arbitrum 🟢 Safe xDai

@github-actions
Copy link

github-actions bot commented Jan 14, 2022

E2E Tests Failed
Check the results here: https://github.com/gnosis/safe-react-e2e-tests/actions/runs/1708500305

Failed tests:

  • ❌ Add an existing safe Add an existing safe
  • ❌ Safe Apps List Safe Apps List
  • ❌ Read-only transaction creation and review Read-only transaction creation and review
  • ❌ Safe Balances Safe Balances

Copy link
Contributor

@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.

Looking good. I adjusted the deployment script to reflect the changes too

@github-actions
Copy link

Deployment links

🟠 Rinkeby Mainnet 🟣 Polygon 🟡 BSC Arbitrum 🟢 Gnosis Chain

@5afe 5afe deleted a comment from github-actions bot Jan 14, 2022
@iamacook
Copy link
Contributor

iamacook commented Jan 15, 2022

I've had a follow up thought to this. We should probably also redirect /app/xdai to /app/gnosis-chain too. What do you think? @katspaugh

@katspaugh
Copy link
Member Author

True dat.

key={chainId}
path={route}
// /xdai also sets chainId correctly
path={chainId === CHAIN_ID.GNOSIS_CHAIN ? [route, '/xdai'] : route}
Copy link
Member Author

Choose a reason for hiding this comment

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

I would add a redirect instead of this

@francovenica
Copy link
Contributor

The MM wallet is no longer the deafult in this PR. it has soemthing to do with the name change?
image

The loader doesn't accept an existing xDai safe
0xB8d760a90a5ed54D3c2b3EFC231277e99188642A
image

@francovenica
Copy link
Contributor

I'm getting these constantly as I try to load a recently created safe
Just create a safe, click "get started" and watch the console

image

@iamacook
Copy link
Contributor

@francovenica, in order to test this you should be using the production CGW

@github-actions
Copy link

Deployment links

🟠 Rinkeby Mainnet 🟣 Polygon 🟡 BSC Arbitrum 🟢 Gnosis Chain

@francovenica
Copy link
Contributor

@iamacook yes, you were right, the issues loading an existing safe and loading a recently created safe don't happen with the CGW switch being on. So those are fine

I still have the issue with the modal, and is something that only happens with the Gnosis Chain. For the other networks MM is still the 1st option in the modal

@iamacook
Copy link
Contributor

I still have the issue with the modal, and is something that only happens with the Gnosis Chain. For the other networks MM is still the 1st option in the modal

I wouldn't be concerned about the order of wallets. I added a draft copy of Gnosis Change to the staging environment for testing. The most important thing is that the redirection works. All we now need to do is rename xDai on production and all should work as it does in production.


export const loadChains = async () => {
const { results = [] } = await getChainsConfig(GATEWAY_URL, { limit: 100 })
const { results = [] } = await getChainsConfig(GATEWAY_URL)
Copy link
Member Author

Choose a reason for hiding this comment

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

Also removed limit: 100.

@francovenica
Copy link
Contributor

The renaming looks good to me.

Check the prefixes, copy paste, the going to the block explorer. Created new safes and loaded safes created while it was xdai.
Imported my local storages fully from prod to here and everything loaded fine (safes on the sidebar, AB, pinned apps)

Note: The issue 3305 is present here, doesn't have anything to do with the naming, but prevented me for executing some tx.

@katspaugh katspaugh merged commit cf886f3 into dev Jan 17, 2022
@katspaugh katspaugh deleted the xdai branch January 17, 2022 17:01
@github-actions github-actions bot locked and limited conversation to collaborators Jan 17, 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.

Rename xDai to Gnosis Chain

5 participants