Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/connect-examples/expo-example/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "expo-example",
"version": "1.1.7",
"version": "1.1.8",
"scripts": {
"start": "cross-env CONNECT_SRC=https://localhost:8087/ yarn expo start --dev-client",
"android": "yarn expo run:android",
Expand All @@ -19,10 +19,10 @@
"@noble/ed25519": "^2.1.0",
"@noble/hashes": "^1.3.3",
"@noble/secp256k1": "^1.7.1",
"@onekeyfe/hd-ble-sdk": "1.1.7",
"@onekeyfe/hd-common-connect-sdk": "1.1.7",
"@onekeyfe/hd-core": "1.1.7",
"@onekeyfe/hd-web-sdk": "1.1.7",
"@onekeyfe/hd-ble-sdk": "1.1.8",
"@onekeyfe/hd-common-connect-sdk": "1.1.8",
"@onekeyfe/hd-core": "1.1.8",
"@onekeyfe/hd-web-sdk": "1.1.8",
"@onekeyfe/react-native-ble-utils": "^0.1.3",
"@polkadot/util-crypto": "13.1.1",
"@react-native-async-storage/async-storage": "1.21.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ const PlaygroundExecutor: React.FC<PlaygroundExecutorProps> = ({

if (method === 'allNetworkGetAddressByLoop') {
// @ts-expect-error
requestParams.onLoopItemResponse = (data: any, error: any) => {
onExecute(JSON.stringify({ data, error }, null, 2));
requestParams.onLoopItemResponse = (data: any) => {
onExecute(JSON.stringify({ data }, null, 2));
};
// @ts-expect-error
requestParams.onAllItemsResponse = (data: any) => {
onExecute(JSON.stringify(data, null, 2));
requestParams.onAllItemsResponse = (data: any, error: any) => {
onExecute(JSON.stringify({ data, error }, null, 2));
};
}
} catch (error) {
Expand Down
8 changes: 4 additions & 4 deletions packages/connect-examples/expo-playground/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "onekey-hardware-playground",
"version": "1.1.7",
"version": "1.1.8",
"private": true,
"sideEffects": [
"app/utils/shim.js",
Expand All @@ -17,9 +17,9 @@
},
"dependencies": {
"@noble/hashes": "^1.8.0",
"@onekeyfe/hd-core": "1.1.7",
"@onekeyfe/hd-shared": "1.1.7",
"@onekeyfe/hd-web-sdk": "1.1.7",
"@onekeyfe/hd-core": "1.1.8",
"@onekeyfe/hd-shared": "1.1.8",
"@onekeyfe/hd-web-sdk": "1.1.8",
"@radix-ui/react-checkbox": "^1.3.2",
"@radix-ui/react-dialog": "^1.1.14",
"@radix-ui/react-dropdown-menu": "^2.1.15",
Expand Down
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-core",
"version": "1.1.7",
"version": "1.1.8",
"description": "> TODO: description",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
Expand All @@ -25,8 +25,8 @@
"url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
},
"dependencies": {
"@onekeyfe/hd-shared": "1.1.7",
"@onekeyfe/hd-transport": "1.1.7",
"@onekeyfe/hd-shared": "1.1.8",
"@onekeyfe/hd-transport": "1.1.8",
"axios": "^0.27.2",
"bignumber.js": "^9.0.2",
"bytebuffer": "^5.0.1",
Expand Down
7 changes: 4 additions & 3 deletions packages/core/src/inject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import { EventEmitter } from 'events';
import { CallMethod } from './events';
import { CoreApi } from './types/api';
import type { AllNetworkAddress } from './types/api/allNetworkGetAddress';
import { Unsuccessful } from './types';

type CallbackFunction = (data?: any, error?: { message: string; code?: number }) => void;
type CallbackFunction = (data?: any, error?: Unsuccessful) => void;

const callbackManager = new Map<string, CallbackFunction>();

Expand Down Expand Up @@ -179,8 +180,8 @@ export const createCoreApi = (
registerCallback(callbackId, onLoopItemResponse);

const callbackIdFinish = generateCallbackId();
registerCallback(callbackIdFinish, (data?: AllNetworkAddress[]) => {
onAllItemsResponse?.(data);
registerCallback(callbackIdFinish, (data?: AllNetworkAddress[], error?: Unsuccessful) => {
onAllItemsResponse?.(data, error);
cleanupCallback(callbackIdFinish);
cleanupCallback(callbackId);
});
Expand Down
8 changes: 4 additions & 4 deletions packages/hd-ble-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-ble-sdk",
"version": "1.1.7",
"version": "1.1.8",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
"license": "ISC",
Expand All @@ -20,8 +20,8 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@onekeyfe/hd-core": "1.1.7",
"@onekeyfe/hd-shared": "1.1.7",
"@onekeyfe/hd-transport-react-native": "1.1.7"
"@onekeyfe/hd-core": "1.1.8",
"@onekeyfe/hd-shared": "1.1.8",
"@onekeyfe/hd-transport-react-native": "1.1.8"
}
}
14 changes: 7 additions & 7 deletions packages/hd-common-connect-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-common-connect-sdk",
"version": "1.1.7",
"version": "1.1.8",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
"license": "ISC",
Expand All @@ -20,11 +20,11 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@onekeyfe/hd-core": "1.1.7",
"@onekeyfe/hd-shared": "1.1.7",
"@onekeyfe/hd-transport-emulator": "1.1.7",
"@onekeyfe/hd-transport-http": "1.1.7",
"@onekeyfe/hd-transport-lowlevel": "1.1.7",
"@onekeyfe/hd-transport-web-device": "1.1.7"
"@onekeyfe/hd-core": "1.1.8",
"@onekeyfe/hd-shared": "1.1.8",
"@onekeyfe/hd-transport-emulator": "1.1.8",
"@onekeyfe/hd-transport-http": "1.1.8",
"@onekeyfe/hd-transport-lowlevel": "1.1.8",
"@onekeyfe/hd-transport-web-device": "1.1.8"
}
}
4 changes: 2 additions & 2 deletions packages/hd-transport-electron/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-transport-electron",
"version": "1.1.7",
"version": "1.1.8",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
"license": "MIT",
Expand All @@ -25,7 +25,7 @@
"electron-log": ">=4.0.0"
},
"dependencies": {
"@onekeyfe/hd-shared": "1.1.7"
"@onekeyfe/hd-shared": "1.1.8"
},
"devDependencies": {
"@types/web-bluetooth": "^0.0.17",
Expand Down
6 changes: 3 additions & 3 deletions packages/hd-transport-emulator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-transport-emulator",
"version": "1.1.7",
"version": "1.1.8",
"description": "hardware emulator transport",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
Expand All @@ -24,8 +24,8 @@
"url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
},
"dependencies": {
"@onekeyfe/hd-shared": "1.1.7",
"@onekeyfe/hd-transport": "1.1.7",
"@onekeyfe/hd-shared": "1.1.8",
"@onekeyfe/hd-transport": "1.1.8",
"axios": "^0.27.2",
"secure-json-parse": "^4.0.0"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/hd-transport-http/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-transport-http",
"version": "1.1.7",
"version": "1.1.8",
"description": "hardware http transport",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
Expand All @@ -24,8 +24,8 @@
"url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
},
"dependencies": {
"@onekeyfe/hd-shared": "1.1.7",
"@onekeyfe/hd-transport": "1.1.7",
"@onekeyfe/hd-shared": "1.1.8",
"@onekeyfe/hd-transport": "1.1.8",
"axios": "^0.27.2",
"secure-json-parse": "^4.0.0"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/hd-transport-lowlevel/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-transport-lowlevel",
"version": "1.1.7",
"version": "1.1.8",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
"license": "MIT",
"main": "dist/index.js",
Expand All @@ -19,7 +19,7 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@onekeyfe/hd-shared": "1.1.7",
"@onekeyfe/hd-transport": "1.1.7"
"@onekeyfe/hd-shared": "1.1.8",
"@onekeyfe/hd-transport": "1.1.8"
}
}
6 changes: 3 additions & 3 deletions packages/hd-transport-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-transport-react-native",
"version": "1.1.7",
"version": "1.1.8",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
"license": "MIT",
"main": "dist/index.js",
Expand All @@ -19,8 +19,8 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@onekeyfe/hd-shared": "1.1.7",
"@onekeyfe/hd-transport": "1.1.7",
"@onekeyfe/hd-shared": "1.1.8",
"@onekeyfe/hd-transport": "1.1.8",
"@onekeyfe/react-native-ble-utils": "^0.1.4",
"react-native-ble-plx": "3.5.0"
}
Expand Down
8 changes: 4 additions & 4 deletions packages/hd-transport-web-device/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-transport-web-device",
"version": "1.1.7",
"version": "1.1.8",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
"license": "MIT",
Expand All @@ -20,11 +20,11 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@onekeyfe/hd-shared": "1.1.7",
"@onekeyfe/hd-transport": "1.1.7"
"@onekeyfe/hd-shared": "1.1.8",
"@onekeyfe/hd-transport": "1.1.8"
},
"devDependencies": {
"@onekeyfe/hd-transport-electron": "1.1.7",
"@onekeyfe/hd-transport-electron": "1.1.8",
"@types/w3c-web-usb": "^1.0.6",
"@types/web-bluetooth": "^0.0.17"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/hd-transport/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-transport",
"version": "1.1.7",
"version": "1.1.8",
"description": "> TODO: description",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
Expand Down
10 changes: 5 additions & 5 deletions packages/hd-web-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-web-sdk",
"version": "1.1.7",
"version": "1.1.8",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
"license": "ISC",
Expand All @@ -21,10 +21,10 @@
},
"dependencies": {
"@onekeyfe/cross-inpage-provider-core": "^0.0.17",
"@onekeyfe/hd-core": "1.1.7",
"@onekeyfe/hd-shared": "1.1.7",
"@onekeyfe/hd-transport-http": "1.1.7",
"@onekeyfe/hd-transport-web-device": "1.1.7"
"@onekeyfe/hd-core": "1.1.8",
"@onekeyfe/hd-shared": "1.1.8",
"@onekeyfe/hd-transport-http": "1.1.8",
"@onekeyfe/hd-transport-web-device": "1.1.8"
},
"devDependencies": {
"@babel/plugin-proposal-optional-chaining": "^7.17.12",
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-shared",
"version": "1.1.7",
"version": "1.1.8",
"description": "Hardware SDK's shared tool library",
"keywords": [
"Hardware-SDK",
Expand Down
Loading