@dynamic-labs-wallet/browser 1.0.29 → 1.0.30
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/index.cjs +7 -1
- package/index.esm.js +7 -1
- package/package.json +3 -3
- package/src/services/logger.d.ts.map +1 -1
package/index.cjs
CHANGED
|
@@ -1846,12 +1846,18 @@ const initializeCloudKit = async (config, signInButtonId, onSignInRequired, onSi
|
|
|
1846
1846
|
* (e.g. wrong password). These are logged at `info` instead of `error`
|
|
1847
1847
|
* so they don't pollute error dashboards with user mistakes.
|
|
1848
1848
|
*/ const isExpectedUserError = (error)=>error instanceof InvalidPasswordError;
|
|
1849
|
+
/**
|
|
1850
|
+
* Returns true for transient API errors that are already logged at the
|
|
1851
|
+
* appropriate level by `handleAxiosError` but may be re-thrown as
|
|
1852
|
+
* `WalletApiError` and caught again (e.g. by queue error handlers).
|
|
1853
|
+
* Logging these at `warn` prevents double-counting them as real errors.
|
|
1854
|
+
*/ const isTransientApiError = (error)=>error instanceof core.WalletApiError && error.status === 429;
|
|
1849
1855
|
const logError = ({ message, error, context, level = 'error' })=>{
|
|
1850
1856
|
if (error instanceof axios.AxiosError) {
|
|
1851
1857
|
core.handleAxiosError(error, message, context);
|
|
1852
1858
|
return;
|
|
1853
1859
|
}
|
|
1854
|
-
const resolvedLevel = isExpectedUserError(error) ? 'info' : level;
|
|
1860
|
+
const resolvedLevel = isExpectedUserError(error) ? 'info' : isTransientApiError(error) ? 'warn' : level;
|
|
1855
1861
|
// Surface the unwrapped `cause` (name only — never its raw fields, which may
|
|
1856
1862
|
// carry key material). Errors like EncryptionSelfTestFailedError wrap the real
|
|
1857
1863
|
// failure (e.g. KeyShareDecryptionError) as `cause`; without this the original
|
package/index.esm.js
CHANGED
|
@@ -1847,12 +1847,18 @@ const initializeCloudKit = async (config, signInButtonId, onSignInRequired, onSi
|
|
|
1847
1847
|
* (e.g. wrong password). These are logged at `info` instead of `error`
|
|
1848
1848
|
* so they don't pollute error dashboards with user mistakes.
|
|
1849
1849
|
*/ const isExpectedUserError = (error)=>error instanceof InvalidPasswordError;
|
|
1850
|
+
/**
|
|
1851
|
+
* Returns true for transient API errors that are already logged at the
|
|
1852
|
+
* appropriate level by `handleAxiosError` but may be re-thrown as
|
|
1853
|
+
* `WalletApiError` and caught again (e.g. by queue error handlers).
|
|
1854
|
+
* Logging these at `warn` prevents double-counting them as real errors.
|
|
1855
|
+
*/ const isTransientApiError = (error)=>error instanceof WalletApiError && error.status === 429;
|
|
1850
1856
|
const logError = ({ message, error, context, level = 'error' })=>{
|
|
1851
1857
|
if (error instanceof AxiosError) {
|
|
1852
1858
|
handleAxiosError(error, message, context);
|
|
1853
1859
|
return;
|
|
1854
1860
|
}
|
|
1855
|
-
const resolvedLevel = isExpectedUserError(error) ? 'info' : level;
|
|
1861
|
+
const resolvedLevel = isExpectedUserError(error) ? 'info' : isTransientApiError(error) ? 'warn' : level;
|
|
1856
1862
|
// Surface the unwrapped `cause` (name only — never its raw fields, which may
|
|
1857
1863
|
// carry key material). Errors like EncryptionSelfTestFailedError wrap the real
|
|
1858
1864
|
// failure (e.g. KeyShareDecryptionError) as `cause`; without this the original
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs-wallet/browser",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.30",
|
|
4
4
|
"license": "Licensed under the Dynamic Labs, Inc. Terms Of Service (https://www.dynamic.xyz/terms-conditions)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@dynamic-labs-wallet/core": "1.0.
|
|
7
|
+
"@dynamic-labs-wallet/core": "1.0.30",
|
|
8
8
|
"@dynamic-labs-wallet/forward-mpc-client": "0.12.0",
|
|
9
|
-
"@dynamic-labs-wallet/primitives": "1.0.
|
|
9
|
+
"@dynamic-labs-wallet/primitives": "1.0.30",
|
|
10
10
|
"@dynamic-labs/sdk-api-core": "^0.0.984",
|
|
11
11
|
"argon2id": "1.0.1",
|
|
12
12
|
"axios": "1.16.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/services/logger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/services/logger.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,QAAQ,wCAKlB;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC1B,KAAG,IAkBH,CAAC"}
|