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

optional chainId (extracted from #4932) #5134

Merged
merged 19 commits into from
Oct 26, 2018

Conversation

hackmod
Copy link
Contributor

@hackmod hackmod commented Aug 24, 2018

from #4932

Description

This PR separates all other stuff except optional chainid support.

Done

  • fixed custom Rpc form to support optional chainid.
    • both old-ui and new-ui
  • fixed custom Rpc css style
  • show optional ticker symbol + nickname
  • hide/show all optional parameters (chainId, symbol and nickname)
    • only new-ui supported

See also

Screen shot

image

@hackmod hackmod changed the title optional chainId (separated from #4932) optional chainId (extracted from #4932) Aug 24, 2018
@chrisfranko
Copy link

:D 🕺

ghost
ghost previously approved these changes Aug 24, 2018
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Much better, thanks 👍

@hackmod
Copy link
Contributor Author

hackmod commented Aug 27, 2018

rebased and fixed defaultValue bug.

@hackmod
Copy link
Contributor Author

hackmod commented Aug 28, 2018

@buhrmi any suggestions are welcome 😃
//
rebased and conflict resolved

@buhrmi
Copy link

buhrmi commented Aug 28, 2018

@hackmod well first of all the failing test needs to be fixed :p

@hackmod
Copy link
Contributor Author

hackmod commented Aug 28, 2018

@buhrmi // test-e2e-fireforx fail is random. I think its circleci fault.
(and now, simply git commit --amend and git push -f again solve this issue)

@buhrmi
Copy link

buhrmi commented Aug 28, 2018

I've just tested it. I was able to deploy and interact with a contract on the classic network within remix. Seems to work fine and good to go :)

@chrisfranko
Copy link

Launched a contract using reminx and the public https://node.expanse.tech node with chain_id 2 perfectly fine.

ghost
ghost previously approved these changes Sep 4, 2018
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

When merge?

@bdresser
Copy link
Contributor

Hi @hackmod @eosclassicteam, thanks again for your patience with this. We appreciate your work and want to make sure it lands with the appropriate implementation that makes it useable and minimally disruptive.

After chatting with the team, here's what we think makes sense:

chain-id-new

UI

  • The default view in the settings menu should remain the same, all additional options should be hidden behind the Show Advanced Options link
  • Header for this section should update to New Network
  • Clicking Show Advanced Options link should reveal three optional fields

Functionality

  • Symbol should update the currency symbol from ETH to whatever the user provides
  • Nickname should determine how the network is named in the Networks dropdown (top-right)
  • No field for block explorer yet, we'd like to think about how to communicate the template format
  • We would not like to change our default pricing APIs from Infura (for ETH) and Balanc3 (for tokens). If the user has specified a custom network, it's acceptable to use cryptocompare, but the PR should not change our default behavior here.

Future improvements

  • We'd eventually like to move in a direction where dapps can suggest a new network to a use (so users don't have to fiddle with these settings). If you're interested, we'd appreciate your feedback on this proposal: API for dapp to request network change #5101
  • Currently the network drop-down menu remembers the last three networks a user joined and drops older ones. We plan to update this functionality to remember all networks a user has joined and allow them to remove whichever they'd like (similar to how imported accounts work now) Editable Networks #5246

Does this spec make sense? Sorry we haven't communicated these needs clearly until now, and thanks for bearing with us as we work through this together. I'll do my best to keep this top of mind for the team until we have something merged. And thank you for all your work! (cc @danfinlay)

@hackmod
Copy link
Contributor Author

hackmod commented Sep 12, 2018

@bdresser // thank you for your support :)
I'm already prepared with extra fixes like as ticker symbol/price api, will follow your suggestion asap!!

@hackmod
Copy link
Contributor Author

hackmod commented Sep 13, 2018

rebased, and follow additional suggestion/recent changes

  • optional symbol / optional nickname added
  • use cryptocompare api conditionally
  • [ ] fix remain bugs
  • deposit with ShapeShift feature is not applied

screen shots

image

image

image

@hackmod hackmod force-pushed the optional-chain_id branch 2 times, most recently from 16b1a65 to 660e21e Compare September 13, 2018 12:34
@whymarrh
Copy link
Contributor

@hackmod I've added a few commits to this PR that we think help the implementation be a bit more generic. I think the commits speak for themselves but let me know if you they don't make sense. The gist of the changes are 1) fromCurrency in the CurrencyController is better named nativeCurrency (47c4508) and 2) the changes in the CurrencyDisplay container can be avoided if we pass in the chain's native currency when needed (99acde4).

As-is, this looks good changes-wise. @estebanmino had pointed out some issues with the login above that I think still persist with these changes (maybe with the RPC URL you shared in the OP). Do you have a suggested set of RPC information we can use to do a proper QA pass? I'm seeing a lot of connection issues when using information you've shared so far.

@estebanmino
Copy link
Contributor

about @whymarrh comments, I tried it out and I don't have found any issue as the one I mentioned before, for me seems that is working both with local ganache-cli and the information provided, when/where are you having those issues?. I agree that it would be very useful to have more RPC information.

const { eventKey, value, timestamp } = activity
const ethValue = index === 0
? `${getValueFromWeiHex({
value,
toCurrency: ETH,
nativeCurrency,
Copy link
Contributor

Choose a reason for hiding this comment

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

Whoops, this should be fromCurrency: nativeCurrency

})} ${ETH}`
: getEthConversionFromWeiHex({ value, toCurrency: ETH, conversionRate })
})} ${nativeCurrency}`
: getEthConversionFromWeiHex({ value, nativeCurrency, toCurrency: nativeCurrency, conversionRate })
Copy link
Contributor

Choose a reason for hiding this comment

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

Whoops, this should be fromCurrency: nativeCurrency

@whymarrh
Copy link
Contributor

when/where are you having those issues?

They're intermittent so I believe they're related to the network connectivity of the added RPC URL. I'm cool with the state of this PR as that's up to what the user adds as their desired network.

@whymarrh whymarrh merged commit 54a8ade into MetaMask:develop Oct 26, 2018
@whymarrh
Copy link
Contributor

@hackmod thanks again for all the work you put into this!

@pyskell
Copy link

pyskell commented Nov 21, 2018

when/where are you having those issues?

They're intermittent so I believe they're related to the network connectivity of the added RPC URL. I'm cool with the state of this PR as that's up to what the user adds as their desired network.

@whymarrh I run the ethereumclassic.network RPC, what issues are you seeing? Intermittent connectivity problems or any specific errors?

@filips123
Copy link
Contributor

How to rename custom network after creation?

@whymarrh
Copy link
Contributor

whymarrh commented Jan 3, 2019

@pyskell I can't remember (sorry!) but I do use that for testing and I'll be sure to mention anything that I run into

@filips123 remove and re-add is the only option right now

@hackmod hackmod deleted the optional-chain_id branch March 8, 2019 22:32
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.

10 participants