@onekeyfe/hd-core 0.1.45 → 0.1.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/tron/TronGetAddress.d.ts +1 -1
- package/dist/api/tron/TronGetAddress.d.ts.map +1 -1
- package/dist/api/tron/TronSignMessage.d.ts +1 -1
- package/dist/api/tron/TronSignMessage.d.ts.map +1 -1
- package/dist/api/tron/TronSignTransaction.d.ts +1 -1
- package/dist/api/tron/TronSignTransaction.d.ts.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/events/ui-request.d.ts +2 -1
- package/dist/events/ui-request.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +9 -6
- package/package.json +4 -4
- package/src/api/aptos/AptosSignTransaction.ts +1 -1
- package/src/api/near/NearGetAddress.ts +1 -1
- package/src/api/near/NearSignTransaction.ts +1 -1
- package/src/api/tron/TronGetAddress.ts +2 -2
- package/src/api/tron/TronSignMessage.ts +3 -3
- package/src/api/tron/TronSignTransaction.ts +2 -2
- package/src/core/index.ts +3 -1
- package/src/events/ui-request.ts +3 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { TronGetAddress as HardwareTronGetAddress } from '@onekeyfe/hd-transport';
|
|
1
2
|
import { BaseMethod } from '../BaseMethod';
|
|
2
3
|
import { TronAddress } from '../../types';
|
|
3
|
-
import { TronGetAddress as HardwareTronGetAddress } from '@onekeyfe/hd-transport';
|
|
4
4
|
export default class TronGetAddress extends BaseMethod<HardwareTronGetAddress[]> {
|
|
5
5
|
hasBundle: boolean;
|
|
6
6
|
init(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TronGetAddress.d.ts","sourceRoot":"","sources":["../../../src/api/tron/TronGetAddress.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TronGetAddress.d.ts","sourceRoot":"","sources":["../../../src/api/tron/TronGetAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAGlF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAwB,WAAW,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,UAAU,CAAC,sBAAsB,EAAE,CAAC;IAC9E,SAAS,UAAS;IAElB,IAAI;IA6BJ,eAAe;;;;;IAQT,GAAG;CAoBV"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseMethod } from '../BaseMethod';
|
|
2
1
|
import { TronSignMessage as HardwareTronSignMessage } from '@onekeyfe/hd-transport';
|
|
2
|
+
import { BaseMethod } from '../BaseMethod';
|
|
3
3
|
export default class TronSignMessage extends BaseMethod<HardwareTronSignMessage> {
|
|
4
4
|
init(): void;
|
|
5
5
|
getVersionRange(): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TronSignMessage.d.ts","sourceRoot":"","sources":["../../../src/api/tron/TronSignMessage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TronSignMessage.d.ts","sourceRoot":"","sources":["../../../src/api/tron/TronSignMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,IAAI,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAGpF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,UAAU,CAAC,uBAAuB,CAAC;IAC9E,IAAI;IAoBJ,eAAe;;;;;IAQT,GAAG;CAWV"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { TronSignTx } from '@onekeyfe/hd-transport';
|
|
1
2
|
import { BaseMethod } from '../BaseMethod';
|
|
2
3
|
import { TronTransaction } from '../../types/api/tronSignTransaction';
|
|
3
|
-
import { TronSignTx } from '@onekeyfe/hd-transport';
|
|
4
4
|
export default class TronSignTransaction extends BaseMethod<TronSignTx> {
|
|
5
5
|
parseTx(tx: TronTransaction, address_n: number[]): TronSignTx;
|
|
6
6
|
init(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TronSignTransaction.d.ts","sourceRoot":"","sources":["../../../src/api/tron/TronSignTransaction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TronSignTransaction.d.ts","sourceRoot":"","sources":["../../../src/api/tron/TronSignTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAGtE,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,UAAU,CAAC,UAAU,CAAC;IACrE,OAAO,CAAC,EAAE,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,UAAU;IAqC7D,IAAI;IAyBJ,eAAe;;;;;IAQT,GAAG;CAOV"}
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";AACA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAqBlC,OAAO,EACL,WAAW,EAYZ,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,eAAe,EAAe,MAAM,UAAU,CAAC;AAE7D,OAAO,eAAe,MAAM,2BAA2B,CAAC;AA2BxD,eAAO,MAAM,OAAO,YAAmB,WAAW,iBAyPjD,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";AACA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAqBlC,OAAO,EACL,WAAW,EAYZ,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,eAAe,EAAe,MAAM,UAAU,CAAC;AAE7D,OAAO,eAAe,MAAM,2BAA2B,CAAC;AA2BxD,eAAO,MAAM,OAAO,YAAmB,WAAW,iBAyPjD,CAAC;AA2KF,eAAO,MAAM,MAAM,0CAkBlB,CAAC;AAuHF,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,YAAY;IACtC,aAAa,CAAC,OAAO,EAAE,WAAW;IA6CxC,OAAO;CAGR;AAED,eAAO,MAAM,QAAQ,YAGpB,CAAC;AAEF,eAAO,MAAM,aAAa,uBAIzB,CAAC;AAMF,eAAO,MAAM,IAAI,aAAoB,eAAe,aAAa,GAAG,8BAmBnE,CAAC"}
|
|
@@ -11,11 +11,12 @@ export declare const UI_REQUEST: {
|
|
|
11
11
|
readonly CLOSE_UI_WINDOW: "ui-close_window";
|
|
12
12
|
readonly BLUETOOTH_PERMISSION: "ui-bluetooth_permission";
|
|
13
13
|
readonly LOCATION_PERMISSION: "ui-location_permission";
|
|
14
|
+
readonly LOCATION_SERVICE_PERMISSION: "ui-location_service_permission";
|
|
14
15
|
readonly FIRMWARE_PROGRESS: "ui-firmware-progress";
|
|
15
16
|
readonly NOT_IN_BOOTLOADER: "ui-device_not_in_bootloader_mode";
|
|
16
17
|
};
|
|
17
18
|
export interface UiRequestWithoutPayload {
|
|
18
|
-
type: typeof UI_REQUEST.CLOSE_UI_WINDOW | typeof UI_REQUEST.BLUETOOTH_PERMISSION | typeof UI_REQUEST.LOCATION_PERMISSION;
|
|
19
|
+
type: typeof UI_REQUEST.CLOSE_UI_WINDOW | typeof UI_REQUEST.BLUETOOTH_PERMISSION | typeof UI_REQUEST.LOCATION_PERMISSION | typeof UI_REQUEST.LOCATION_SERVICE_PERMISSION;
|
|
19
20
|
payload?: typeof undefined;
|
|
20
21
|
}
|
|
21
22
|
export declare type UiRequestDeviceAction = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-request.d.ts","sourceRoot":"","sources":["../../src/events/ui-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,QAAQ,aAAa,CAAC;AAEnC,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"ui-request.d.ts","sourceRoot":"","sources":["../../src/events/ui-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,QAAQ,aAAa,CAAC;AAEnC,eAAO,MAAM,UAAU;;;;;;;;;;;CAeb,CAAC;AAEX,MAAM,WAAW,uBAAuB;IACtC,IAAI,EACA,OAAO,UAAU,CAAC,eAAe,GACjC,OAAO,UAAU,CAAC,oBAAoB,GACtC,OAAO,UAAU,CAAC,mBAAmB,GACrC,OAAO,UAAU,CAAC,2BAA2B,CAAC;IAClD,OAAO,CAAC,EAAE,OAAO,SAAS,CAAC;CAC5B;AAED,oBAAY,qBAAqB,GAAG;IAClC,IAAI,EAAE,OAAO,UAAU,CAAC,WAAW,CAAC;IACpC,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,KAAK,CAAC,oBAAoB,GAAG,wBAAwB,CAAC;KAC9D,CAAC;CACH,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,OAAO,UAAU,CAAC,cAAc,CAAC;IACvC,OAAO,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;CACzC;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,OAAO,UAAU,CAAC,4BAA4B,CAAC;IACrD,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;QACf,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;CACH;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,OAAO,UAAU,CAAC,iBAAiB,CAAC;IAC1C,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED,oBAAY,OAAO,GACf,uBAAuB,GACvB,qBAAqB,GACrB,eAAe,GACf,mBAAmB,GACnB,gBAAgB,CAAC;AAErB,oBAAY,cAAc,GAAG,OAAO,GAAG;IAAE,KAAK,EAAE,OAAO,QAAQ,CAAA;CAAE,CAAC;AAElE,eAAO,MAAM,eAAe,EAAE,gBAAgB,CAAC,OAAO,QAAQ,EAAE,OAAO,CAK5D,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1191,11 +1191,12 @@ declare const UI_REQUEST: {
|
|
|
1191
1191
|
readonly CLOSE_UI_WINDOW: "ui-close_window";
|
|
1192
1192
|
readonly BLUETOOTH_PERMISSION: "ui-bluetooth_permission";
|
|
1193
1193
|
readonly LOCATION_PERMISSION: "ui-location_permission";
|
|
1194
|
+
readonly LOCATION_SERVICE_PERMISSION: "ui-location_service_permission";
|
|
1194
1195
|
readonly FIRMWARE_PROGRESS: "ui-firmware-progress";
|
|
1195
1196
|
readonly NOT_IN_BOOTLOADER: "ui-device_not_in_bootloader_mode";
|
|
1196
1197
|
};
|
|
1197
1198
|
interface UiRequestWithoutPayload {
|
|
1198
|
-
type: typeof UI_REQUEST.CLOSE_UI_WINDOW | typeof UI_REQUEST.BLUETOOTH_PERMISSION | typeof UI_REQUEST.LOCATION_PERMISSION;
|
|
1199
|
+
type: typeof UI_REQUEST.CLOSE_UI_WINDOW | typeof UI_REQUEST.BLUETOOTH_PERMISSION | typeof UI_REQUEST.LOCATION_PERMISSION | typeof UI_REQUEST.LOCATION_SERVICE_PERMISSION;
|
|
1199
1200
|
payload?: typeof undefined;
|
|
1200
1201
|
}
|
|
1201
1202
|
declare type UiRequestDeviceAction = {
|
package/dist/index.js
CHANGED
|
@@ -10464,6 +10464,7 @@ const UI_REQUEST$1 = {
|
|
|
10464
10464
|
CLOSE_UI_WINDOW: 'ui-close_window',
|
|
10465
10465
|
BLUETOOTH_PERMISSION: 'ui-bluetooth_permission',
|
|
10466
10466
|
LOCATION_PERMISSION: 'ui-location_permission',
|
|
10467
|
+
LOCATION_SERVICE_PERMISSION: 'ui-location_service_permission',
|
|
10467
10468
|
FIRMWARE_PROGRESS: 'ui-firmware-progress',
|
|
10468
10469
|
NOT_IN_BOOTLOADER: 'ui-device_not_in_bootloader_mode',
|
|
10469
10470
|
};
|
|
@@ -14559,7 +14560,7 @@ class TronGetAddress extends BaseMethod {
|
|
|
14559
14560
|
getVersionRange() {
|
|
14560
14561
|
return {
|
|
14561
14562
|
model_mini: {
|
|
14562
|
-
min: '2.
|
|
14563
|
+
min: '2.5.0',
|
|
14563
14564
|
},
|
|
14564
14565
|
};
|
|
14565
14566
|
}
|
|
@@ -14598,7 +14599,7 @@ class TronSignMessage extends BaseMethod {
|
|
|
14598
14599
|
getVersionRange() {
|
|
14599
14600
|
return {
|
|
14600
14601
|
model_mini: {
|
|
14601
|
-
min: '2.
|
|
14602
|
+
min: '2.5.0',
|
|
14602
14603
|
},
|
|
14603
14604
|
};
|
|
14604
14605
|
}
|
|
@@ -14666,7 +14667,7 @@ class TronSignTransaction extends BaseMethod {
|
|
|
14666
14667
|
getVersionRange() {
|
|
14667
14668
|
return {
|
|
14668
14669
|
model_mini: {
|
|
14669
|
-
min: '2.
|
|
14670
|
+
min: '2.5.0',
|
|
14670
14671
|
},
|
|
14671
14672
|
};
|
|
14672
14673
|
}
|
|
@@ -14708,7 +14709,7 @@ class NearGetAddress extends BaseMethod {
|
|
|
14708
14709
|
getVersionRange() {
|
|
14709
14710
|
return {
|
|
14710
14711
|
model_mini: {
|
|
14711
|
-
min: '2.
|
|
14712
|
+
min: '2.5.0',
|
|
14712
14713
|
},
|
|
14713
14714
|
};
|
|
14714
14715
|
}
|
|
@@ -14747,7 +14748,7 @@ class NearSignTransaction extends BaseMethod {
|
|
|
14747
14748
|
getVersionRange() {
|
|
14748
14749
|
return {
|
|
14749
14750
|
model_mini: {
|
|
14750
|
-
min: '2.
|
|
14751
|
+
min: '2.5.0',
|
|
14751
14752
|
},
|
|
14752
14753
|
};
|
|
14753
14754
|
}
|
|
@@ -15320,6 +15321,7 @@ const ensureConnected = (method, pollingId) => __awaiter(void 0, void 0, void 0,
|
|
|
15320
15321
|
if ([
|
|
15321
15322
|
hdShared.HardwareErrorCode.BlePermissionError,
|
|
15322
15323
|
hdShared.HardwareErrorCode.BleLocationError,
|
|
15324
|
+
hdShared.HardwareErrorCode.BleLocationServicesDisabled,
|
|
15323
15325
|
hdShared.HardwareErrorCode.BleDeviceNotBonded,
|
|
15324
15326
|
hdShared.HardwareErrorCode.BleCharacteristicNotifyError,
|
|
15325
15327
|
hdShared.HardwareErrorCode.BleWriteCharacteristicError,
|
|
@@ -15456,7 +15458,8 @@ class Core extends events.exports {
|
|
|
15456
15458
|
break;
|
|
15457
15459
|
}
|
|
15458
15460
|
case UI_REQUEST$1.BLUETOOTH_PERMISSION:
|
|
15459
|
-
case UI_REQUEST$1.LOCATION_PERMISSION:
|
|
15461
|
+
case UI_REQUEST$1.LOCATION_PERMISSION:
|
|
15462
|
+
case UI_REQUEST$1.LOCATION_SERVICE_PERMISSION: {
|
|
15460
15463
|
postMessage(message);
|
|
15461
15464
|
break;
|
|
15462
15465
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.47",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "OneKey",
|
|
6
6
|
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@onekeyfe/hd-shared": "^0.1.
|
|
28
|
-
"@onekeyfe/hd-transport": "^0.1.
|
|
27
|
+
"@onekeyfe/hd-shared": "^0.1.47",
|
|
28
|
+
"@onekeyfe/hd-transport": "^0.1.47",
|
|
29
29
|
"axios": "^0.27.2",
|
|
30
30
|
"bignumber.js": "^9.0.2",
|
|
31
31
|
"js-sha256": "^0.9.0",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"@types/parse-uri": "^1.0.0",
|
|
37
37
|
"@types/semver": "^7.3.9"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "66d6a45a4b761292ca21ddf8e0d1c192d3756529"
|
|
40
40
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AptosSignTx as HardwareAptosSignTx } from '@onekeyfe/hd-transport';
|
|
2
2
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
|
-
import {
|
|
3
|
+
import { validatePath } from '../helpers/pathUtils';
|
|
4
4
|
import { BaseMethod } from '../BaseMethod';
|
|
5
5
|
import { validateParams } from '../helpers/paramsValidator';
|
|
6
6
|
import { formatAnyHex } from '../helpers/hexUtils';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { TronGetAddress as HardwareTronGetAddress } from '@onekeyfe/hd-transport';
|
|
1
2
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
2
3
|
import { serializedPath, validatePath } from '../helpers/pathUtils';
|
|
3
4
|
import { BaseMethod } from '../BaseMethod';
|
|
4
5
|
import { validateParams } from '../helpers/paramsValidator';
|
|
5
6
|
import { TronGetAddressParams, TronAddress } from '../../types';
|
|
6
|
-
import { TronGetAddress as HardwareTronGetAddress } from '@onekeyfe/hd-transport';
|
|
7
7
|
|
|
8
8
|
export default class TronGetAddress extends BaseMethod<HardwareTronGetAddress[]> {
|
|
9
9
|
hasBundle = false;
|
|
@@ -40,7 +40,7 @@ export default class TronGetAddress extends BaseMethod<HardwareTronGetAddress[]>
|
|
|
40
40
|
getVersionRange() {
|
|
41
41
|
return {
|
|
42
42
|
model_mini: {
|
|
43
|
-
min: '2.
|
|
43
|
+
min: '2.5.0',
|
|
44
44
|
},
|
|
45
45
|
};
|
|
46
46
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { TronSignMessage as HardwareTronSignMessage } from '@onekeyfe/hd-transport';
|
|
1
2
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
2
3
|
import { validatePath } from '../helpers/pathUtils';
|
|
3
4
|
import { BaseMethod } from '../BaseMethod';
|
|
4
5
|
import { validateParams } from '../helpers/paramsValidator';
|
|
5
6
|
import { stripHexPrefix } from '../helpers/hexUtils';
|
|
6
|
-
import { TronSignMessage as HardwareTronSignMessage } from '@onekeyfe/hd-transport';
|
|
7
7
|
|
|
8
8
|
export default class TronSignMessage extends BaseMethod<HardwareTronSignMessage> {
|
|
9
9
|
init() {
|
|
@@ -29,7 +29,7 @@ export default class TronSignMessage extends BaseMethod<HardwareTronSignMessage>
|
|
|
29
29
|
getVersionRange() {
|
|
30
30
|
return {
|
|
31
31
|
model_mini: {
|
|
32
|
-
min: '2.
|
|
32
|
+
min: '2.5.0',
|
|
33
33
|
},
|
|
34
34
|
};
|
|
35
35
|
}
|
|
@@ -40,7 +40,7 @@ export default class TronSignMessage extends BaseMethod<HardwareTronSignMessage>
|
|
|
40
40
|
'TronMessageSignature',
|
|
41
41
|
{
|
|
42
42
|
...this.params,
|
|
43
|
-
}
|
|
43
|
+
}
|
|
44
44
|
);
|
|
45
45
|
|
|
46
46
|
return Promise.resolve(response.message);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { TronSignTx } from '@onekeyfe/hd-transport';
|
|
1
2
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
2
3
|
import { validatePath } from '../helpers/pathUtils';
|
|
3
4
|
import { BaseMethod } from '../BaseMethod';
|
|
4
5
|
import { validateParams } from '../helpers/paramsValidator';
|
|
5
6
|
import { TronTransaction } from '../../types/api/tronSignTransaction';
|
|
6
|
-
import { TronSignTx } from '@onekeyfe/hd-transport';
|
|
7
7
|
import { formatAnyHex } from '../helpers/hexUtils';
|
|
8
8
|
|
|
9
9
|
export default class TronSignTransaction extends BaseMethod<TronSignTx> {
|
|
@@ -72,7 +72,7 @@ export default class TronSignTransaction extends BaseMethod<TronSignTx> {
|
|
|
72
72
|
getVersionRange() {
|
|
73
73
|
return {
|
|
74
74
|
model_mini: {
|
|
75
|
-
min: '2.
|
|
75
|
+
min: '2.5.0',
|
|
76
76
|
},
|
|
77
77
|
};
|
|
78
78
|
}
|
package/src/core/index.ts
CHANGED
|
@@ -457,6 +457,7 @@ const ensureConnected = async (method: BaseMethod, pollingId: number) => {
|
|
|
457
457
|
[
|
|
458
458
|
HardwareErrorCode.BlePermissionError,
|
|
459
459
|
HardwareErrorCode.BleLocationError,
|
|
460
|
+
HardwareErrorCode.BleLocationServicesDisabled,
|
|
460
461
|
HardwareErrorCode.BleDeviceNotBonded,
|
|
461
462
|
HardwareErrorCode.BleCharacteristicNotifyError,
|
|
462
463
|
HardwareErrorCode.BleWriteCharacteristicError,
|
|
@@ -633,7 +634,8 @@ export default class Core extends EventEmitter {
|
|
|
633
634
|
}
|
|
634
635
|
|
|
635
636
|
case UI_REQUEST.BLUETOOTH_PERMISSION:
|
|
636
|
-
case UI_REQUEST.LOCATION_PERMISSION:
|
|
637
|
+
case UI_REQUEST.LOCATION_PERMISSION:
|
|
638
|
+
case UI_REQUEST.LOCATION_SERVICE_PERMISSION: {
|
|
637
639
|
postMessage(message);
|
|
638
640
|
break;
|
|
639
641
|
}
|
package/src/events/ui-request.ts
CHANGED
|
@@ -15,6 +15,7 @@ export const UI_REQUEST = {
|
|
|
15
15
|
|
|
16
16
|
BLUETOOTH_PERMISSION: 'ui-bluetooth_permission',
|
|
17
17
|
LOCATION_PERMISSION: 'ui-location_permission',
|
|
18
|
+
LOCATION_SERVICE_PERMISSION: 'ui-location_service_permission',
|
|
18
19
|
|
|
19
20
|
FIRMWARE_PROGRESS: 'ui-firmware-progress',
|
|
20
21
|
|
|
@@ -25,7 +26,8 @@ export interface UiRequestWithoutPayload {
|
|
|
25
26
|
type:
|
|
26
27
|
| typeof UI_REQUEST.CLOSE_UI_WINDOW
|
|
27
28
|
| typeof UI_REQUEST.BLUETOOTH_PERMISSION
|
|
28
|
-
| typeof UI_REQUEST.LOCATION_PERMISSION
|
|
29
|
+
| typeof UI_REQUEST.LOCATION_PERMISSION
|
|
30
|
+
| typeof UI_REQUEST.LOCATION_SERVICE_PERMISSION;
|
|
29
31
|
payload?: typeof undefined;
|
|
30
32
|
}
|
|
31
33
|
|