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

Conversation

@yagopv
Copy link
Member

@yagopv yagopv commented Nov 25, 2021

What it solves

Resolves safe-global/safe-react-apps#185

How this PR fixes it

We are going to get the chain info from the apps using the SDK (safe-global/safe-apps-sdk#258). So in this PR we are adding the listener for retrieving the required info

How to test it

  1. Open the Transaction Builder app in Get chain info for showing native token symbol safe-global/safe-react-apps#215 inside the Gnosis Safe Web
  2. Add a contract
  3. Check the labels showing the native token are showing the native one and not always ETH

@github-actions
Copy link

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link

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

@yagopv yagopv requested review from dasanra and katspaugh November 25, 2021 14:57
@yagopv yagopv marked this pull request as ready for review November 25, 2021 14:57
@coveralls
Copy link

Pull Request Test Coverage Report for Build 1504215715

  • 0 of 5 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 31.939%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/routes/safe/components/Apps/components/AppFrame.tsx 0 5 0.0%
Totals Coverage Status
Change from base Build 1502811290: -0.01%
Covered Lines: 2991
Relevant Lines: 8366

💛 - Coveralls

@github-actions
Copy link

Deployment links

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

@github-actions
Copy link

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

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.

Muy bien!

communicator?.on(Methods.getChainInfo, async () => {
const { nativeCoin } = getNetworkInfo()
const chainId = parseInt(networkId, 10)
const network = getNetworkName()
Copy link
Member

Choose a reason for hiding this comment

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

@iamacook in your chains PR, do these functions still exist?

Copy link
Contributor

Choose a reason for hiding this comment

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

The current issues regarding using Redux likely affect every change I have made so far, so I can take the opportunity to start again with these changes included.

Copy link
Member Author

Choose a reason for hiding this comment

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

We are aware of that and we are planning to change this in @iamacook PR. Once this one is unblocked we will push this changed to his PR

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 think @iamacook has a selector or something that we can use

Copy link
Contributor

@iamacook iamacook Nov 25, 2021

Choose a reason for hiding this comment

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

If this gets merged prior, it would be a lot easier for me to handle. Either way, I'll be happy to help fix any merge conflicts.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, we are going to merge this tomorrow or on monday at the latest I think

@dasanra
Copy link
Collaborator

dasanra commented Nov 25, 2021

@katspaugh @iamacook Thank you for your review. Next step for us would be sync with Aaron, as we already checked his PR about using the /chains endpoint. We are going to use the selector he created to provide the complete chain information to the safe apps

@iamacook
Copy link
Contributor

@dasanra, I have been unable to sort the issues I showed you last week regarding the store so I'll be changing my approach in a new branch. Feel free to merge this. I'll try to keep the logic as close to how it currently is instead

@yagopv yagopv merged commit d04a59e into dev Nov 26, 2021
@yagopv yagopv deleted the feature/add-get-chain-info-listener branch November 26, 2021 13:47
@github-actions github-actions bot locked and limited conversation to collaborators Nov 26, 2021
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.

Transaction builder - Native token descriptions per network (address to address)

7 participants