Fix a few Ethereum & WalletConnect related issues#91
Fix a few Ethereum & WalletConnect related issues#91xphoniex wants to merge 6 commits intoradicle-dev:masterfrom
Conversation
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
ed482a0 to
5e1dd2b
Compare
common/src/ethereum.rs
Outdated
| } | ||
| Long("walletconnect") => { | ||
| options.walletconnect = true; | ||
| std::env::set_var("RAD_SIGNER_LEGACY", "true"); |
There was a problem hiding this comment.
Not sure this is the best way to pass a variable down 😂
There was a problem hiding this comment.
Correct, this is temporary, and we'll eventually omit this once we move to v2.0. Also would have to add a lot of code, every place which calls ethereum::transaction has to find out if wallet is WalletConnect. there are 6 places currently which means at least 18 more lines, and an unnecessary flag on ethereum::transaction signature.
Made a compromise here.
5e1dd2b to
bffb2ae
Compare
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
* add gas limit * remove nonce (could cause issue) * don't transform `v` as it's legacy * improve signature extraction * add error for when WalletConnect API failed to sign Signed-off-by: xphoniex <dj.2dixx@gmail.com>
Affects: * rad-gov * rad-ens Signed-off-by: xphoniex <dj.2dixx@gmail.com>
bffb2ae to
f199b3d
Compare
| .await | ||
| .map_err(SignerMiddlewareError::SignerError) | ||
| } | ||
| } |
There was a problem hiding this comment.
Why did we copy all of this over from ethers?
There was a problem hiding this comment.
I mean why do we have our own Signer type with all the same methods plus one extra and our own SignerMiddleware and SignerMiddlewareError?
171dad3 to
49ad2de
Compare
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
49ad2de to
4f1ebeb
Compare
No description provided.