diff --git a/.yarn/versions/df8ca3ae.yml b/.yarn/versions/df8ca3ae.yml new file mode 100644 index 00000000..a8744e26 --- /dev/null +++ b/.yarn/versions/df8ca3ae.yml @@ -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 diff --git a/packages/json-rpc-error/index.js b/packages/json-rpc-error/index.js index 7bf22577..38b3b46a 100644 --- a/packages/json-rpc-error/index.js +++ b/packages/json-rpc-error/index.js @@ -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