The returned value of .request(...)
method at the providers does not comply with EIP-1193
#6345
Labels
.request(...)
method at the providers does not comply with EIP-1193
#6345
Expected behavior
The
.request(...)
method should return theresult
of the response, not the full response.And this is how it is implemented for example by MetaMask as in https://docs.metamask.io/guide/ethereum-provider.html#methods:
Actual behavior
The returned value is a response object like:
And this caused an issue for example at Ganache repo when using the new provider from version 4.x with the pice of code: https://github.com/trufflesuite/truffle/blob/develop/packages/encoder/lib/adapter.ts#L150
Steps to reproduce the behavior
Environment
web3.js v4.0.3
Hint
If you face this issue, you can work around it by simply accessing
response.result
.The text was updated successfully, but these errors were encountered: