@onekeyfe/hd-web-sdk 0.1.31 → 0.1.34
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.0ef4739a49f35b361e32.js +3 -0
- package/build/js/{iframe.20e1138d8fc4c248b553.js.LICENSE.txt → iframe.0ef4739a49f35b361e32.js.LICENSE.txt} +0 -0
- package/build/js/iframe.0ef4739a49f35b361e32.js.map +1 -0
- package/build/onekey-js-sdk.js +40 -6
- 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.34"}/`;
|
|
14869
14869
|
const DEFAULT_PRIORITY = 2;
|
|
14870
14870
|
const initialSettings = {
|
|
14871
14871
|
configSrc: './data/config.json',
|
|
@@ -15141,9 +15141,17 @@ class Device extends events.exports {
|
|
|
15141
15141
|
|
|
15142
15142
|
if (message.passphrase_protection) {
|
|
15143
15143
|
if (this.listenerCount(DEVICE.PIN) > 0) {
|
|
15144
|
-
|
|
15145
|
-
|
|
15146
|
-
|
|
15144
|
+
Log$3.debug('try to close passpharse');
|
|
15145
|
+
|
|
15146
|
+
try {
|
|
15147
|
+
yield this.commands.typedCall('ApplySettings', 'Success', {
|
|
15148
|
+
use_passphrase: false
|
|
15149
|
+
});
|
|
15150
|
+
} catch (e) {
|
|
15151
|
+
yield this.release();
|
|
15152
|
+
this.runPromise = null;
|
|
15153
|
+
throw e;
|
|
15154
|
+
}
|
|
15147
15155
|
}
|
|
15148
15156
|
}
|
|
15149
15157
|
});
|
|
@@ -15213,6 +15221,8 @@ class Device extends events.exports {
|
|
|
15213
15221
|
}
|
|
15214
15222
|
|
|
15215
15223
|
_runInner(fn, options) {
|
|
15224
|
+
var _a;
|
|
15225
|
+
|
|
15216
15226
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15217
15227
|
if (!this.isUsedHere() || this.commands.disposed) {
|
|
15218
15228
|
const env = DataManager.getSettings('env');
|
|
@@ -15233,6 +15243,21 @@ class Device extends events.exports {
|
|
|
15233
15243
|
|
|
15234
15244
|
return Promise.reject(hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.DeviceInitializeFailed, `Initialize failed: ${error.message}, code: ${error.code}`));
|
|
15235
15245
|
}
|
|
15246
|
+
} else if (env === 'react-native') {
|
|
15247
|
+
if ((_a = this.features) === null || _a === void 0 ? void 0 : _a.passphrase_protection) {
|
|
15248
|
+
if (this.listenerCount(DEVICE.PIN) > 0) {
|
|
15249
|
+
Log$3.debug('try to close passpharse for mobile');
|
|
15250
|
+
|
|
15251
|
+
try {
|
|
15252
|
+
yield this.commands.typedCall('ApplySettings', 'Success', {
|
|
15253
|
+
use_passphrase: false
|
|
15254
|
+
});
|
|
15255
|
+
} catch (e) {
|
|
15256
|
+
this.runPromise = null;
|
|
15257
|
+
return Promise.reject(e);
|
|
15258
|
+
}
|
|
15259
|
+
}
|
|
15260
|
+
}
|
|
15236
15261
|
}
|
|
15237
15262
|
}
|
|
15238
15263
|
|
|
@@ -15241,7 +15266,16 @@ class Device extends events.exports {
|
|
|
15241
15266
|
}
|
|
15242
15267
|
|
|
15243
15268
|
if (fn) {
|
|
15244
|
-
|
|
15269
|
+
try {
|
|
15270
|
+
yield fn();
|
|
15271
|
+
} catch (e) {
|
|
15272
|
+
if (this.runPromise) {
|
|
15273
|
+
this.runPromise.reject(e);
|
|
15274
|
+
}
|
|
15275
|
+
|
|
15276
|
+
this.runPromise = null;
|
|
15277
|
+
return;
|
|
15278
|
+
}
|
|
15245
15279
|
}
|
|
15246
15280
|
|
|
15247
15281
|
if (!this.keepSession && typeof options.keepSession !== 'boolean' || options.keepSession === false) {
|
|
@@ -46503,7 +46537,7 @@ const src_init = async settings => {
|
|
|
46503
46537
|
|
|
46504
46538
|
try {
|
|
46505
46539
|
await init({ ..._settings,
|
|
46506
|
-
version: "0.1.
|
|
46540
|
+
version: "0.1.34"
|
|
46507
46541
|
});
|
|
46508
46542
|
return true;
|
|
46509
46543
|
} catch (e) {
|