@metamask-previews/kyc-controller 0.0.0-preview-0d04fb622 → 0.0.0-preview-7e951bf
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/CHANGELOG.md +1 -0
- package/dist/KycController.cjs +5 -4
- package/dist/KycController.cjs.map +1 -1
- package/dist/KycController.d.cts.map +1 -1
- package/dist/KycController.d.mts.map +1 -1
- package/dist/KycController.mjs +5 -4
- package/dist/KycController.mjs.map +1 -1
- package/dist/logger.cjs +9 -0
- package/dist/logger.cjs.map +1 -0
- package/dist/logger.d.cts +6 -0
- package/dist/logger.d.cts.map +1 -0
- package/dist/logger.d.mts +6 -0
- package/dist/logger.d.mts.map +1 -0
- package/dist/logger.mjs +6 -0
- package/dist/logger.mjs.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -42,6 +42,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
42
42
|
- **BREAKING:** Require `sumsubTncSigned` and `idosTncSigned` on `acceptTermsAndStartSession` for every vendor, so callers explicitly declare T&C2 acceptance. Zero-argument calls and omitted flags fail instead of defaulting to `true`. ([#9908](https://github.com/MetaMask/core/pull/9908))
|
|
43
43
|
- Rename `CreateUkycSessionParams.vendorId` to `vendor` for consistency with other service methods. ([#9908](https://github.com/MetaMask/core/pull/9908))
|
|
44
44
|
- Bump `@metamask/base-data-service` from `^0.1.3` to `^1.0.0` ([#9972](https://github.com/MetaMask/core/pull/9972))
|
|
45
|
+
- Replace `KycController` `console.error` tracing with the `@metamask/utils` debug logger (`createProjectLogger` / `createModuleLogger`), so flow diagnostics are opt-in via `DEBUG=kyc-controller*` instead of always printing to the console. ([#10054](https://github.com/MetaMask/core/pull/10054))
|
|
45
46
|
|
|
46
47
|
### Fixed
|
|
47
48
|
|
package/dist/KycController.cjs
CHANGED
|
@@ -18,6 +18,7 @@ const utils_1 = require("@metamask/utils");
|
|
|
18
18
|
const ed25519_1 = require("@noble/curves/ed25519");
|
|
19
19
|
const crypto_js_1 = require("./crypto.cjs");
|
|
20
20
|
const encoding_js_1 = require("./encoding.cjs");
|
|
21
|
+
const logger_js_1 = require("./logger.cjs");
|
|
21
22
|
const deriveClientMaterial_js_1 = require("./ukyc/deriveClientMaterial.cjs");
|
|
22
23
|
const jwtChain_js_1 = require("./ukyc/jwtChain.cjs");
|
|
23
24
|
const localUserSecret_js_1 = require("./ukyc/localUserSecret.cjs");
|
|
@@ -1242,7 +1243,7 @@ async function _KycController_startConsentsSession(consents) {
|
|
|
1242
1243
|
await this.refreshKycStatus();
|
|
1243
1244
|
}
|
|
1244
1245
|
catch (statusError) {
|
|
1245
|
-
|
|
1246
|
+
(0, logger_js_1.controllerLog)('KYC status refresh failed:', statusError);
|
|
1246
1247
|
}
|
|
1247
1248
|
__classPrivateFieldGet(this, _KycController_instances, "m", _KycController_updateIfCurrent).call(this, generation, (state) => {
|
|
1248
1249
|
state.phase = 'done';
|
|
@@ -1278,7 +1279,7 @@ async function _KycController_startConsentsSession(consents) {
|
|
|
1278
1279
|
await this.refreshKycStatus();
|
|
1279
1280
|
}
|
|
1280
1281
|
catch (statusError) {
|
|
1281
|
-
|
|
1282
|
+
(0, logger_js_1.controllerLog)('KYC status refresh failed:', statusError);
|
|
1282
1283
|
}
|
|
1283
1284
|
__classPrivateFieldGet(this, _KycController_instances, "m", _KycController_updateIfCurrent).call(this, generation, (state) => {
|
|
1284
1285
|
if (state.phase !== 'error' && state.phase !== 'done') {
|
|
@@ -1306,7 +1307,7 @@ async function _KycController_startConsentsSession(consents) {
|
|
|
1306
1307
|
});
|
|
1307
1308
|
return;
|
|
1308
1309
|
}
|
|
1309
|
-
|
|
1310
|
+
(0, logger_js_1.controllerLog)('Consents session failed:', error);
|
|
1310
1311
|
if (__classPrivateFieldGet(this, _KycController_generation, "f") !== generation) {
|
|
1311
1312
|
return;
|
|
1312
1313
|
}
|
|
@@ -1437,7 +1438,7 @@ async function _KycController_createSession() {
|
|
|
1437
1438
|
});
|
|
1438
1439
|
}
|
|
1439
1440
|
catch (error) {
|
|
1440
|
-
|
|
1441
|
+
(0, logger_js_1.controllerLog)('Session creation failed:', error);
|
|
1441
1442
|
// A reset() superseded this flow while the request was in flight; leave
|
|
1442
1443
|
// the idle controller alone rather than forcing it back to `terms`.
|
|
1443
1444
|
if (__classPrivateFieldGet(this, _KycController_generation, "f") !== generation) {
|