@onekeyfe/hd-web-sdk 0.1.31 → 0.1.32
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/build/iframe.html +1 -1
- package/build/js/iframe.0871a885b71d4b4e3a34.js +3 -0
- package/build/js/{iframe.20e1138d8fc4c248b553.js.LICENSE.txt → iframe.0871a885b71d4b4e3a34.js.LICENSE.txt} +0 -0
- package/build/js/iframe.0871a885b71d4b4e3a34.js.map +1 -0
- package/build/onekey-js-sdk.js +31 -4
- package/build/onekey-js-sdk.js.map +1 -1
- package/build/onekey-js-sdk.min.js +1 -1
- package/build/onekey-js-sdk.min.js.map +1 -1
- package/package.json +6 -6
- package/webpack/dev.webpack.config.ts +1 -1
- package/build/js/iframe.20e1138d8fc4c248b553.js +0 -3
- package/build/js/iframe.20e1138d8fc4c248b553.js.map +0 -1
package/build/onekey-js-sdk.js
CHANGED
|
@@ -14865,7 +14865,7 @@ const UI_REQUEST = {
|
|
|
14865
14865
|
FIRMWARE_NOT_INSTALLED: 'ui-device_firmware_not_installed',
|
|
14866
14866
|
NOT_USE_ONEKEY_DEVICE: 'ui-device_please_use_onekey_device'
|
|
14867
14867
|
};
|
|
14868
|
-
const DEFAULT_DOMAIN = `https://jssdk.onekey.so/${"0.1.
|
|
14868
|
+
const DEFAULT_DOMAIN = `https://jssdk.onekey.so/${"0.1.32"}/`;
|
|
14869
14869
|
const DEFAULT_PRIORITY = 2;
|
|
14870
14870
|
const initialSettings = {
|
|
14871
14871
|
configSrc: './data/config.json',
|
|
@@ -15141,6 +15141,7 @@ class Device extends events.exports {
|
|
|
15141
15141
|
|
|
15142
15142
|
if (message.passphrase_protection) {
|
|
15143
15143
|
if (this.listenerCount(DEVICE.PIN) > 0) {
|
|
15144
|
+
Log$3.debug('try to close passpharse');
|
|
15144
15145
|
yield this.commands.typedCall('ApplySettings', 'Success', {
|
|
15145
15146
|
use_passphrase: false
|
|
15146
15147
|
});
|
|
@@ -15213,6 +15214,8 @@ class Device extends events.exports {
|
|
|
15213
15214
|
}
|
|
15214
15215
|
|
|
15215
15216
|
_runInner(fn, options) {
|
|
15217
|
+
var _a;
|
|
15218
|
+
|
|
15216
15219
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15217
15220
|
if (!this.isUsedHere() || this.commands.disposed) {
|
|
15218
15221
|
const env = DataManager.getSettings('env');
|
|
@@ -15233,6 +15236,21 @@ class Device extends events.exports {
|
|
|
15233
15236
|
|
|
15234
15237
|
return Promise.reject(hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.DeviceInitializeFailed, `Initialize failed: ${error.message}, code: ${error.code}`));
|
|
15235
15238
|
}
|
|
15239
|
+
} else if (env === 'react-native') {
|
|
15240
|
+
if ((_a = this.features) === null || _a === void 0 ? void 0 : _a.passphrase_protection) {
|
|
15241
|
+
if (this.listenerCount(DEVICE.PIN) > 0) {
|
|
15242
|
+
Log$3.debug('try to close passpharse for mobile');
|
|
15243
|
+
|
|
15244
|
+
try {
|
|
15245
|
+
yield this.commands.typedCall('ApplySettings', 'Success', {
|
|
15246
|
+
use_passphrase: false
|
|
15247
|
+
});
|
|
15248
|
+
} catch (e) {
|
|
15249
|
+
this.runPromise = null;
|
|
15250
|
+
return Promise.reject(e);
|
|
15251
|
+
}
|
|
15252
|
+
}
|
|
15253
|
+
}
|
|
15236
15254
|
}
|
|
15237
15255
|
}
|
|
15238
15256
|
|
|
@@ -15241,7 +15259,16 @@ class Device extends events.exports {
|
|
|
15241
15259
|
}
|
|
15242
15260
|
|
|
15243
15261
|
if (fn) {
|
|
15244
|
-
|
|
15262
|
+
try {
|
|
15263
|
+
yield fn();
|
|
15264
|
+
} catch (e) {
|
|
15265
|
+
if (this.runPromise) {
|
|
15266
|
+
this.runPromise.reject(e);
|
|
15267
|
+
}
|
|
15268
|
+
|
|
15269
|
+
this.runPromise = null;
|
|
15270
|
+
return;
|
|
15271
|
+
}
|
|
15245
15272
|
}
|
|
15246
15273
|
|
|
15247
15274
|
if (!this.keepSession && typeof options.keepSession !== 'boolean' || options.keepSession === false) {
|
|
@@ -17475,7 +17502,7 @@ class EVMSignTransaction extends BaseMethod {
|
|
|
17475
17502
|
}))
|
|
17476
17503
|
};
|
|
17477
17504
|
const response = yield this.device.commands.typedCall('EthereumSignTxEIP1559', 'EthereumTxRequest', message);
|
|
17478
|
-
return this.processTxRequest(response.message, rest);
|
|
17505
|
+
return this.processTxRequest(response.message, rest, chainId);
|
|
17479
17506
|
});
|
|
17480
17507
|
}
|
|
17481
17508
|
|
|
@@ -46503,7 +46530,7 @@ const src_init = async settings => {
|
|
|
46503
46530
|
|
|
46504
46531
|
try {
|
|
46505
46532
|
await init({ ..._settings,
|
|
46506
|
-
version: "0.1.
|
|
46533
|
+
version: "0.1.32"
|
|
46507
46534
|
});
|
|
46508
46535
|
return true;
|
|
46509
46536
|
} catch (e) {
|