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

Blockaid scanning : Status code is 200 with the error in the response #4815

Open
liliya-soroka opened this issue Jan 22, 2025 · 0 comments
Open
Labels
major Major bug (to be solved in the next release)
Milestone

Comments

@liliya-soroka
Copy link
Member

liliya-soroka commented Jan 22, 2025

Bug description

Status code is 200 with the error in the response. The error is not displayed in the message on UI

Environment

  • Browser: Chrome
  • Wallet: MetaMask
  • Chain: Ethereum mainnet

Steps to reproduce

Example : https://client.blockaid.io/v0/evm/json-rpc/scan
Payload : “{"chain":"0x1","account_address":"0x8675B754342754A30A2AeF474D114d8460bca19b","data":{"method":"eth_signTypedData_v4","params":["0x8675B754342754A30A2AeF474D114d8460bca19b","{\"types\":{\"EIP712Domain\":[{\"type\":\"uint256\",\"name\":\"chainId\"},{\"type\":\"address\",\"name\":\"verifyingContract\"}],\"SafeTx\":[{\"type\":\"address\",\"name\":\"to\"},{\"type\":\"uint256\",\"name\":\"value\"},{\"type\":\"bytes\",\"name\":\"data\"},{\"type\":\"uint8\",\"name\":\"operation\"},{\"type\":\"uint256\",\"name\":\"safeTxGas\"},{\"type\":\"uint256\",\"name\":\"baseGas\"},{\"type\":\"uint256\",\"name\":\"gasPrice\"},{\"type\":\"address\",\"name\":\"gasToken\"},{\"type\":\"address\",\"name\":\"refundReceiver\"},{\"type\":\"uint256\",\"name\":\"nonce\"}]},\"domain\":{\"verifyingContract\":\"0x8675B754342754A30A2AeF474D114d8460bca19b\",\"chainId\":\"1\"},\"primaryType\":\"SafeTx\",\"message\":{\"to\":\"0xC6d3D201530a6D4aD9dFbAAd39C5f68A9A470a69\",\"value\":\"0\",\"data\":\"0xa9059cbb00000000000000000000000065f8236309e5a99ff0d129d04e486ebce20dc7b00000000000000000000000000000000000000000000000000000000000002443\",\"operation\":0,\"baseGas\":\"0\",\"gasPrice\":\"0\",\"gasToken\":\"0x0000000000000000000000000000000000000000\",\"refundReceiver\":\"0x0000000000000000000000000000000000000000\",\"nonce\":445,\"safeTxGas\":\"0\"}}"]},"options":["simulation","validation"],"metadata":{"domain":"[fix_blockaid--walletweb.review.5afe.dev](http://fix_blockaid--walletweb.review.5afe.dev/)"}}
Code 200
Response: {"validation":{"status":"Error","result_type":"Error","description":"","reason":"","features":[],"error":"Simulation Error: Reverted with reason string: 'ERC20: transfer amount exceeds balance'","labels":[]},"simulation":{"status":"Error","error":"Reverted with reason string: 'ERC20: transfer amount exceeds balance'"},"block":"21680411","chain":"ethereum","account_address":"0x8675B754342754A30A2AeF474D114d8460bca19b"}
UI message:

Image

token address -

Expected result

Could we display the error from the response instead of the general message as a warning?

Obtained result

Screenshots

@liliya-soroka liliya-soroka added bug major Major bug (to be solved in the next release) labels Jan 22, 2025
@katspaugh katspaugh added this to the 1.50.0 milestone Jan 23, 2025
@katspaugh katspaugh removed the bug label Jan 23, 2025
@compojoom compojoom modified the milestones: 1.50.0, 1.50.1 Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major Major bug (to be solved in the next release)
Projects
None yet
Development

No branches or pull requests

3 participants