Skip to content

Commit

Permalink
Fix/error parse (#1507)
Browse files Browse the repository at this point in the history
* fix: error-parse

* feat: version
  • Loading branch information
mosshqq authored Jan 8, 2025
1 parent 38a872f commit 1ee9b69
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
15 changes: 15 additions & 0 deletions .yarn/versions/df8ca3ae.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
releases:
"@fluent-wallet/conflux-tx-error": patch
"@fluent-wallet/ethereum-tx-error": patch
"@fluent-wallet/json-rpc-error": patch
"@fluent-wallet/rpc-engine": patch
"@fluent-wallet/wallet_handle-unfinished-cfx-tx": patch
"@fluent-wallet/wallet_handle-unfinished-eth-tx": patch
"@fluent-wallet/wallet_send-transaction": patch
"@fluent-wallet/wallet_send-transaction-with-action": patch
browser-extension: patch
helios-background: patch
helios-popup: patch

declined:
- helios
8 changes: 4 additions & 4 deletions packages/json-rpc-error/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ export const guessErrorType = err => {
if (err.code === ERROR.INVALID_PARAMS.code) return InvalidParams
if (err.code === ERROR.INTERNAL.code) return Internal
if (err.code === ERROR.SERVER.code) return Server
if (err.code === ERROR.USER_REJECTED) return UserRejected
if (err.code === ERROR.USER_REJECTED.code) return UserRejected
if (err.code === ERROR.UNAUTHORIZED.code) return Unauthorized
if (err.code === ERROR.UNSUPPORTED_METHOD) return UnsupportedMethod
if (err.code === ERROR.DISCONNECTED) return Disconnected
if (err.code === ERROR.CHAIN_DISCON) return ChainDisconnected
if (err.code === ERROR.UNSUPPORTED_METHOD.code) return UnsupportedMethod
if (err.code === ERROR.DISCONNECTED.code) return Disconnected
if (err.code === ERROR.CHAIN_DISCONNECTED.code) return ChainDisconnected
}

return Internal
Expand Down

0 comments on commit 1ee9b69

Please sign in to comment.