chainx-org / chainx-wallet-bug-bounty

The bug bounty program repository for ChainX wallet, signer and extension. Please submit issues and get reward.
3 stars 0 forks source link

页面报错 #27

Open feilun-feilun opened 3 years ago

feilun-feilun commented 3 years ago

更新,该问题重现方式为:在自己的钱包下点击体验账户后,会显示加载中,然后一会儿就报该页面错误。

https://dapp-v2.chainx.org/trust 几个菜单相互切换,换几次页面报错,显示如下内容。

Unhandled Rejection (TypeError): Cannot read property 'locks' of undefined (anonymous function) src/reducers/assetSlice.js:102 99 | 100 | export const fetchLocks = address => async dispatch => { 101 | const api = getChainx()

102 | const locks = await api.query.xStaking.locks(address) 103 | dispatch(setLocks(locks.toJSON())) 104 | } 105 | View compiled ▶ 2 stack frames were collapsed. (anonymous function) src/App.js:57 54 | // dispatch(fetchBondingDuration()) 55 | 56 | dispatch(fetchAccountAssets(address)) 57 | dispatch(fetchLocks(address)) | ^ 58 | dispatch(fetchChainx2NativeAsset(address)) 59 | 60 | const api = getChainx() View compiled ▶ 12 stack frames were collapsed.

Unhandled Rejection (TypeError): Cannot read property 'account' of undefined (anonymous function) src/reducers/assetSlice.js:114 111 | 112 | export const fetchChainx2NativeAsset = address => async dispatch => { 113 | const api = getChainx()

114 | const asset = await api.query.system.account(address) 115 | let nativeAsset = {} 116 | for (let [key, value] of asset.data.entries()) { 117 | nativeAsset[key] = value.toString() View compiled ▶ 2 stack frames were collapsed. (anonymous function) src/App.js:58 55 | 56 | dispatch(fetchAccountAssets(address)) 57 | dispatch(fetchLocks(address)) 58 | dispatch(fetchChainx2NativeAsset(address)) | ^ 59 | 60 | const api = getChainx() 61 | let unsubscribeNewHead = null View compiled ▶ 12 stack frames were collapsed.

feilun-feilun commented 3 years ago

F12:部分报错内容如下 API-WS: DOMException: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS. at WsProvider.connect (https://dapp-v2.chainx.org/static/js/0.chunk.js:157007:158) at async WsProvider.connectWithRetry (https://dapp-v2.chainx.org/static/js/0.chunk.js:157029:7)

feilun-feilun commented 3 years ago

重现方式:几个菜单间反复切换,“投票选举”菜单内会出现加载的情况,加载一会儿就报错。 截图如下: 01 02 03