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

Make getExplorerInfo return values per network#1470

Merged
dasanra merged 1 commit intofeature/#1353-xDai-compatibilityfrom
issue-1450
Oct 14, 2020
Merged

Make getExplorerInfo return values per network#1470
dasanra merged 1 commit intofeature/#1353-xDai-compatibilityfrom
issue-1450

Conversation

@nicosampler
Copy link
Contributor

In a discussion related to how to deal with getExplorerInfo (it's a function that returns the explorer URL to inspect an address or transaction). Pablo and I suggested that we should have a separate file in order to define all the functions that should handle a particular case depending on the current network.

The intention was that at the moment of creating a new network, a developer should go to src/config folder and replicate all the existing files with the new network. Giving it a second thought I think it is an overkill, at the moment getExplorerInfo it's the only function that needs a special treatment depending on the network.

Another alternative is to create another file utils.ts (?) where we can handle all these particular cases, but we will end having an index.ts and a utils.ts where won't be crystal what's the purpose of each one.

What I suggest to do is to make a little refactor in the current getExplorerInfo. That's what this PR does.

@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 1 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@ghost
Copy link

ghost commented Oct 13, 2020

Travis automatic deployment:
https://pr1470--safereact.review.gnosisdev.com/app

@dasanra dasanra merged commit b033938 into feature/#1353-xDai-compatibility Oct 14, 2020
@dasanra dasanra deleted the issue-1450 branch October 14, 2020 15:02
@github-actions github-actions bot locked and limited conversation to collaborators Oct 14, 2020
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.

3 participants