MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
11.83k stars 4.83k forks source link

Cross Network Use of Accounts Should Return Warning Message #3429

Open andersonmmi opened 6 years ago

andersonmmi commented 6 years ago

screen shot 2018-03-04 at 3 38 55 pm

Full write up here: https://medium.com/@andersonmmi/truffle-testrpc-accounts-can-cost-unwarry-developers-real-world-ether-c314c9bc970a

2-am-zzz commented 6 years ago

Although I understand your concerns, would you have any ideas by which we could even detect this kind of behavior? If it were as simple as detecting if a user has used a non-mainnet testnet within a single session, then we could set some booleans in the background to trigger a warning message.

However, it seems in this case that you've imported a private key from Truffle. There isn't a very good way for us to detect if this is a "test address" on the various chains out there.

However again, this was a test address that is basically becoming a "whoops" ground for several people--would it help you if we just blacklist this specific address and warn people that this is the truffle address as a stopgap measure?

andersonmmi commented 6 years ago

You know how imported addresses are labelled as loose? We could just label these testRPC/ganache addresses with "test". Seems like a logic test against the array of known test addresses could check this on the front end and it would be very light. I can code it up an PR it if that would help?

2-am-zzz commented 6 years ago

Yes please, go ahead and start up the PR and we can continue discussions there--thank you for such due diligence on writing up that blog post!