Skip to content

Commit

Permalink
Merge branch 'dev' into feat/mv3-inject
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jan 20, 2025
2 parents d751934 + c4dffbb commit 7b597a6
Show file tree
Hide file tree
Showing 18 changed files with 30 additions and 26 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "helios",
"private": true,
"version": "2.8.1",
"version": "2.8.0",
"workspaces": [
"websites/*",
"packages/doc-ui/*",
Expand Down
2 changes: 1 addition & 1 deletion packages/background/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "helios-background",
"version": "0.0.31",
"version": "0.0.33",
"type": "module",
"main": "src/index.js",
"private": true,
Expand Down
2 changes: 0 additions & 2 deletions packages/background/src/rpc-engine-opts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/browser-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "browser-extension",
"version": "0.0.31",
"version": "0.0.33",
"main": "index.js",
"author": "yqrashawn <[email protected]>",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/conflux-tx-error/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"main": "index.js",
"packageManager": "[email protected]",
"version": "1.0.0",
"version": "1.0.1",
"dependencies": {
"@fluent-wallet/json-rpc-error": "workspace:packages/json-rpc-error"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/ethereum-tx-error/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"main": "index.js",
"packageManager": "[email protected]",
"version": "1.0.3",
"version": "1.0.4",
"dependencies": {
"@fluent-wallet/json-rpc-error": "workspace:packages/json-rpc-error"
}
Expand Down
1 change: 0 additions & 1 deletion packages/inner-utils/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
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
2 changes: 1 addition & 1 deletion packages/json-rpc-error/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/popup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": true,
"name": "helios-popup",
"type": "module",
"version": "0.1.14",
"version": "0.1.15",
"main": "index.js",
"author": "yqrashawn <[email protected]>",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions packages/rpc-engine/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down Expand Up @@ -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},
Expand Down
15 changes: 11 additions & 4 deletions packages/rpc-engine/middlewares/call-rpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion packages/rpc-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/rpcs/cfx_signTransaction/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/rpcs/wallet_handleUnfinishedCFXTx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"main": "index.js",
"packageManager": "[email protected]",
"version": "1.0.14",
"version": "1.0.15",
"dependencies": {
"@ethersproject/bignumber": "5.6.2",
"@fluent-wallet/compose": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/rpcs/wallet_handleUnfinishedETHTx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"main": "index.js",
"packageManager": "[email protected]",
"version": "1.0.15",
"version": "1.0.16",
"dependencies": {
"@ethersproject/bignumber": "5.6.2",
"@fluent-wallet/compose": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/rpcs/wallet_sendTransaction/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"main": "index.js",
"packageManager": "[email protected]",
"version": "3.0.7",
"version": "3.0.8",
"dependencies": {
"@ethersproject/bignumber": "5.6.2",
"@fluent-wallet/cfx_send-transaction": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"main": "index.js",
"packageManager": "[email protected]",
"version": "1.0.7",
"version": "1.0.8",
"dependencies": {
"@fluent-wallet/spec": "1.0.8",
"@fluent-wallet/wallet_send-transaction": "workspace:*"
Expand Down

0 comments on commit 7b597a6

Please sign in to comment.