diff --git a/package.json b/package.json index 91b6ecec4..6abda7cad 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "helios", "private": true, - "version": "2.8.1", + "version": "2.8.0", "workspaces": [ "websites/*", "packages/doc-ui/*", diff --git a/packages/background/package.json b/packages/background/package.json index c76e01ccf..3838ce5b6 100644 --- a/packages/background/package.json +++ b/packages/background/package.json @@ -1,6 +1,6 @@ { "name": "helios-background", - "version": "0.0.31", + "version": "0.0.33", "type": "module", "main": "src/index.js", "private": true, diff --git a/packages/background/src/rpc-engine-opts.js b/packages/background/src/rpc-engine-opts.js index 1eb585044..ea2929e3b 100644 --- a/packages/background/src/rpc-engine-opts.js +++ b/packages/background/src/rpc-engine-opts.js @@ -110,7 +110,6 @@ import * as ethMaxPriorityFeePerGas from '@fluent-wallet/eth_max-priority-fee-pe import * as ethEstimate1559Fee from '@fluent-wallet/eth_estimate-1559-fee' import { - IS_CI, IS_DEV_MODE, IS_PROD_MODE, IS_TEST_MODE, @@ -186,7 +185,6 @@ export const rpcEngineOpts = { isProd: IS_PROD_MODE, isDev: IS_DEV_MODE, isTest: IS_TEST_MODE, - isCI: IS_CI, methods: [ walletMetadataForPopup, walletDbQuery, diff --git a/packages/browser-extension/package.json b/packages/browser-extension/package.json index 07d129d12..cdce31ba9 100644 --- a/packages/browser-extension/package.json +++ b/packages/browser-extension/package.json @@ -1,6 +1,6 @@ { "name": "browser-extension", - "version": "0.0.31", + "version": "0.0.33", "main": "index.js", "author": "yqrashawn ", "license": "MIT", diff --git a/packages/conflux-tx-error/package.json b/packages/conflux-tx-error/package.json index 720df51c0..115341932 100644 --- a/packages/conflux-tx-error/package.json +++ b/packages/conflux-tx-error/package.json @@ -3,7 +3,7 @@ "type": "module", "main": "index.js", "packageManager": "yarn@3.1.0", - "version": "1.0.0", + "version": "1.0.1", "dependencies": { "@fluent-wallet/json-rpc-error": "workspace:packages/json-rpc-error" } diff --git a/packages/ethereum-tx-error/package.json b/packages/ethereum-tx-error/package.json index 30d6e5284..fe7c80bf3 100644 --- a/packages/ethereum-tx-error/package.json +++ b/packages/ethereum-tx-error/package.json @@ -3,7 +3,7 @@ "type": "module", "main": "index.js", "packageManager": "yarn@3.1.0", - "version": "1.0.3", + "version": "1.0.4", "dependencies": { "@fluent-wallet/json-rpc-error": "workspace:packages/json-rpc-error" } diff --git a/packages/inner-utils/env.js b/packages/inner-utils/env.js index ff57e05a1..99be9cc6c 100644 --- a/packages/inner-utils/env.js +++ b/packages/inner-utils/env.js @@ -4,7 +4,6 @@ export const MODE = import.meta.env export const IS_TEST_MODE = MODE === 'test' export const IS_DEV_MODE = MODE === 'development' export const IS_PROD_MODE = MODE === 'production' -export const IS_CI = process.env.CI === 'true' export const PACKAGE_VERSION = process.env.PACKAGE_VERSION // this version is use by view, it include the version suffix e.g v1.0.0.rc-1 diff --git a/packages/json-rpc-error/index.js b/packages/json-rpc-error/index.js index 7bf225779..38b3b46a5 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 diff --git a/packages/json-rpc-error/package.json b/packages/json-rpc-error/package.json index cc60034c5..4051ddef7 100644 --- a/packages/json-rpc-error/package.json +++ b/packages/json-rpc-error/package.json @@ -2,7 +2,7 @@ "name": "@fluent-wallet/json-rpc-error", "type": "module", "main": "index.js", - "version": "1.1.2", + "version": "1.1.3", "dependencies": { "@fluent-wallet/errors": "workspace:packages/errors" } diff --git a/packages/popup/package.json b/packages/popup/package.json index 4e181bdcc..c23ac9179 100644 --- a/packages/popup/package.json +++ b/packages/popup/package.json @@ -2,7 +2,7 @@ "private": true, "name": "helios-popup", "type": "module", - "version": "0.1.14", + "version": "0.1.15", "main": "index.js", "author": "yqrashawn ", "license": "MIT", diff --git a/packages/rpc-engine/index.js b/packages/rpc-engine/index.js index c5845818b..b8de21f4b 100644 --- a/packages/rpc-engine/index.js +++ b/packages/rpc-engine/index.js @@ -29,7 +29,7 @@ const request = (s, req = {}) => { } const defRpcEngineFactory = (db, options = {methods: []}) => { - const {methods, isProd = true, isDev, isTest, isCI} = options + const {methods, isProd = true, isDev, isTest} = options const rpcStore = new Object() // to store rpc defination methods.forEach(rpc => { @@ -92,7 +92,7 @@ const defRpcEngineFactory = (db, options = {methods: []}) => { const processSpec = ({ins, fn, outs}) => ({ ins: { ...ins, - MODE: {const: {isProd, isDev, isTest, isCI}}, + MODE: {const: {isProd, isDev, isTest}}, db: {const: db}, rpcStore: {const: rpcStore}, sendNewRpcRequest: {const: () => sendNewRpcRequest}, diff --git a/packages/rpc-engine/middlewares/call-rpc.js b/packages/rpc-engine/middlewares/call-rpc.js index d607d3c50..d77592d9d 100644 --- a/packages/rpc-engine/middlewares/call-rpc.js +++ b/packages/rpc-engine/middlewares/call-rpc.js @@ -64,10 +64,17 @@ export default defMiddleware( ) ) { // allow some inpage rpc methods to request the unlock ui - await req.rpcs.wallet_requestUnlockUI().catch(err => { - err.rpcData = req - throw err - }) + await req.rpcs + .wallet_requestUnlockUI( + { + errorFallThrough: true, + }, + undefined, + ) + .catch(err => { + err.rpcData = req + throw err + }) } else { // reject others const err = req.Err.Unauthorized() diff --git a/packages/rpc-engine/package.json b/packages/rpc-engine/package.json index 9e99699ce..a2603a826 100644 --- a/packages/rpc-engine/package.json +++ b/packages/rpc-engine/package.json @@ -2,7 +2,7 @@ "name": "@fluent-wallet/rpc-engine", "type": "module", "main": "index.js", - "version": "2.0.9", + "version": "2.0.11", "dependencies": { "@fluent-wallet/associative": "workspace:packages/associative", "@fluent-wallet/cache-rpc": "workspace:packages/cache-rpc", diff --git a/packages/rpcs/cfx_signTransaction/index.js b/packages/rpcs/cfx_signTransaction/index.js index ab1c8a532..d1943fac3 100644 --- a/packages/rpcs/cfx_signTransaction/index.js +++ b/packages/rpcs/cfx_signTransaction/index.js @@ -139,7 +139,7 @@ export const main = async args => { if (!fromAddr) throw InvalidParams(`Invalid from address ${newTx.from}`) /** - * ledger app check, v1.x is is not support 1559 transaction + * ledger app check, v1.x is not support 1559 transaction * so we need check this app version */ let isV1LedgerAPP = false diff --git a/packages/rpcs/wallet_handleUnfinishedCFXTx/package.json b/packages/rpcs/wallet_handleUnfinishedCFXTx/package.json index 186a13b46..ff82471be 100644 --- a/packages/rpcs/wallet_handleUnfinishedCFXTx/package.json +++ b/packages/rpcs/wallet_handleUnfinishedCFXTx/package.json @@ -3,7 +3,7 @@ "type": "module", "main": "index.js", "packageManager": "yarn@3.1.0", - "version": "1.0.14", + "version": "1.0.15", "dependencies": { "@ethersproject/bignumber": "5.6.2", "@fluent-wallet/compose": "workspace:*", diff --git a/packages/rpcs/wallet_handleUnfinishedETHTx/package.json b/packages/rpcs/wallet_handleUnfinishedETHTx/package.json index 5c5eb7491..85c08c7b3 100644 --- a/packages/rpcs/wallet_handleUnfinishedETHTx/package.json +++ b/packages/rpcs/wallet_handleUnfinishedETHTx/package.json @@ -3,7 +3,7 @@ "type": "module", "main": "index.js", "packageManager": "yarn@3.1.0", - "version": "1.0.15", + "version": "1.0.16", "dependencies": { "@ethersproject/bignumber": "5.6.2", "@fluent-wallet/compose": "workspace:*", diff --git a/packages/rpcs/wallet_sendTransaction/package.json b/packages/rpcs/wallet_sendTransaction/package.json index 17414c11a..6d04fbdb3 100644 --- a/packages/rpcs/wallet_sendTransaction/package.json +++ b/packages/rpcs/wallet_sendTransaction/package.json @@ -3,7 +3,7 @@ "type": "module", "main": "index.js", "packageManager": "yarn@3.1.0", - "version": "3.0.7", + "version": "3.0.8", "dependencies": { "@ethersproject/bignumber": "5.6.2", "@fluent-wallet/cfx_send-transaction": "workspace:*", diff --git a/packages/rpcs/wallet_sendTransactionWithAction/package.json b/packages/rpcs/wallet_sendTransactionWithAction/package.json index 26e18130e..f4fbf41c4 100644 --- a/packages/rpcs/wallet_sendTransactionWithAction/package.json +++ b/packages/rpcs/wallet_sendTransactionWithAction/package.json @@ -3,7 +3,7 @@ "type": "module", "main": "index.js", "packageManager": "yarn@3.2.0", - "version": "1.0.7", + "version": "1.0.8", "dependencies": { "@fluent-wallet/spec": "1.0.8", "@fluent-wallet/wallet_send-transaction": "workspace:*"