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

Added a backported websocket provider implementaton for web3 0.x #255

Merged
merged 14 commits into from
Jul 20, 2018

Conversation

ritave
Copy link
Contributor

@ritave ritave commented Jul 9, 2018

Caveat - The provider never closes and keeps the Node process forever running. This is consistent with the upstream implementation

@coveralls
Copy link

coveralls commented Jul 9, 2018

Pull Request Test Coverage Report for Build 5419

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 87.474%

Totals Coverage Status
Change from base Build 5014: 0.0%
Covered Lines: 580
Relevant Lines: 624

💛 - Coveralls

@@ -31,7 +31,7 @@ class Main extends React.Component<DispatchProp<any> & RouteComponentProps<any>>

public onNetworkUpdated = async (): Promise<void> => {
const civil = getCivil();
if (civil.network) {
if (civil.network === "4") {
this.props.dispatch!(setNetwork(civil.network));
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 we need to set the network even if it's not rinkeby so that we properly render the error ("switch to rinkeby") bar

@ritave ritave added the dont merge pr not ready for merge label Jul 12, 2018
this.unbscribeEthereum();
}

public createEthereumSubscription(civil?: Civil): void {
Copy link
Member

Choose a reason for hiding this comment

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

this stuff is good but it should all happen outside of the component and be stored in redux, like how we store network/account in redux currently

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nickreynolds There is no redux in the components package and it's used in multiple places, not only the dapp. This is the most backwards-compatible way I've found. If we get eg a standard of how we should write react components and refactor all our front-ends then sure
cc @dankins we really need one

Copy link
Member

Choose a reason for hiding this comment

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

well you would just pass this data in to the component as a prop and the DApp would get it from its redux

clazz.new(
{{> params inputs=contract.inputs}}
{{> params inputs=ctor.inputs}}
Copy link
Member

Choose a reason for hiding this comment

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

not sure why this changed

Copy link
Member

@nickreynolds nickreynolds left a comment

Choose a reason for hiding this comment

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

looks good except the part where we get network/account in the component instead of from redux and there's a few debugging comments left in.

@ritave ritave force-pushed the ritave/ws-provider branch 2 times, most recently from 63e2fd0 to a711444 Compare July 19, 2018 18:38
@ritave ritave removed the dont merge pr not ready for merge label Jul 19, 2018
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

3 participants