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

Enforce chainId #324

Merged
merged 11 commits into from
Jan 19, 2021
Merged

Enforce chainId #324

merged 11 commits into from
Jan 19, 2021

Conversation

estebanmino
Copy link
Contributor

This PR makes sure that all custom rpc networks have a valid chainId, and disregard the usage of networkId in favor of chainId

@estebanmino estebanmino requested a review from a team as a code owner January 13, 2021 18:35
This reverts commit 20b0adb.
Copy link
Member

@rekmarks rekmarks left a comment

Choose a reason for hiding this comment

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

Overall looks good! Just a few questions and requests.

src/network/NetworkController.ts Outdated Show resolved Hide resolved
src/transaction/TransactionController.ts Show resolved Hide resolved
Comment on lines +15 to +21
mainnet = '1',
kovan = '42',
rinkeby = '4',
goerli = '5',
ropsten = '3',
localhost = '',
rpc = '',
Copy link
Member

Choose a reason for hiding this comment

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

Could we store these in hexadecimal instead?

Possibly related: #326

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll do it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh wait, this would need a migration as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for transactions, I'd put that together with the work on the tx controller

Copy link
Member

Choose a reason for hiding this comment

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

We decided to do this in a follow-up.

tests/TransactionController.test.ts Outdated Show resolved Hide resolved
Copy link
Member

@rekmarks rekmarks left a comment

Choose a reason for hiding this comment

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

LGTM!

@estebanmino estebanmino merged commit 23cdb2d into develop Jan 19, 2021
@estebanmino estebanmino deleted the enforce-chain-id branch January 19, 2021 15:54
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
* chainif

* txcontroller

* not default

* mutex

* test

* Revert "mutex"

This reverts commit 20b0adb.

* tests

* fulltest

* format

* comments
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
* chainif

* txcontroller

* not default

* mutex

* test

* Revert "mutex"

This reverts commit 20b0adb.

* tests

* fulltest

* format

* comments
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.

None yet

2 participants