Web3.js: [1.0] account management inconsistency

Created on 28 Nov 2017  路  3Comments  路  Source: ChainSafe/web3.js

Trying to use the new eth.accounts to manage the local wallet, noticed that in Method.sendRequest, it only routed 2 RPC to the accounts object: eth_sendTransaction and eth_sign, but not eth_accounts .... so potentially eth.getAccouts() and eth.accounts could return different results... is that by design or just a bug?

enhancement

Most helpful comment

So no one gives a shit about it right ? :D it is totally messy everything... the types are completely wrong methods that not exists...they..do..exist and i am like "debugger" everywhere to see what they put inside this object :D back to 2001 :D

All 3 comments

looks like this problem is bigger than I thought. Found related issue (#1154), apparently there are more RPC api not get intercepted for account transformation in sendRequest, such as the personal API... I am now more concerned that this inconsistency could be a serious issue 鈥硷笍 if some API is getting account information from eth.accounts while others from RPC provider...

Based on the code and documents, I assume the following: if the local accounts (eth.accounts) are available, they should be used for all API consistently.

web3 team, we could help fix it but would need to know if this assumption aligns with your intended design...

So no one gives a shit about it right ? :D it is totally messy everything... the types are completely wrong methods that not exists...they..do..exist and i am like "debugger" everywhere to see what they put inside this object :D back to 2001 :D

Was this page helpful?
0 / 5 - 0 ratings