helix-bridge / wormhole-ui

https://wormhole-ui.vercel.app/
2 stars 1 forks source link

历史记录选项卡造成页面挂掉 #138

Open xiaoch05 opened 2 years ago

xiaoch05 commented 2 years ago

Prerequisites

Importance

Serious

Priority

Medium

Description

历史记录选择 Pangolin Smart => Ropsten 组合后页面挂掉,不可恢复

How to reproduce this issue

历史记录选择 Pangolin Smart => Ropsten 组合 输入搜索地址

Actual behavior

页面挂掉

Expected behavior

正常显示

Please provide the environment you discovered this bug in

No response

Anything else?

No response

sxlwar commented 2 years ago

image image

There is a problem with the API, the HTTP code is 200 but the response has a params error, the code should actually be 404.

This causes the HTTP error handling on the front end to be a virtual null, and the exception data (in this case null ) runs into the normal flow and hangs.

https://github.com/darwinia-network/wormhole-ui/blob/db9faf0b6bd157520c9f8fdc8033436c25f58990/src/utils/records/issuing.ts#L37-L41

It is recommended to set the correct response status according to the semantics of the HTTP code