@dynamic-labs/utils 0.19.0-alpha.0 → 0.19.0-alpha.2
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 +78 -0
- package/package.json +2 -2
- package/src/errors/UserHasAccountWithEmailError.cjs +14 -0
- package/src/errors/UserHasAccountWithEmailError.d.ts +5 -0
- package/src/errors/UserHasAccountWithEmailError.js +10 -0
- package/src/errors/index.d.ts +1 -0
- package/src/index.cjs +2 -0
- package/src/index.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,82 @@
|
|
|
1
1
|
|
|
2
|
+
## [0.19.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.0-alpha.1...v0.19.0-alpha.2) (2023-08-21)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### ⚠ BREAKING CHANGES
|
|
6
|
+
|
|
7
|
+
* useSocialAccounts: error type changed from string to SocialOAuthError:
|
|
8
|
+
export type SocialOAuthError = {
|
|
9
|
+
code: SocialOAuthErrorCode;
|
|
10
|
+
message: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add ErrorPage when user tries to transfer the last wallet out account when preventOrphanedAccounts is true ([#2919](https://github.com/dynamic-labs/DynamicAuth/issues/2919)) ([7144211](https://github.com/dynamic-labs/DynamicAuth/commit/71442116851ddb22911b7809b45f9c3a49989fdf)), closes [#2924](https://github.com/dynamic-labs/DynamicAuth/issues/2924) [#2956](https://github.com/dynamic-labs/DynamicAuth/issues/2956) [#2960](https://github.com/dynamic-labs/DynamicAuth/issues/2960)
|
|
16
|
+
* add onEmailVerificationX callbacks ([#2859](https://github.com/dynamic-labs/DynamicAuth/issues/2859)) ([1c1c66d](https://github.com/dynamic-labs/DynamicAuth/commit/1c1c66dc47fb1966a2ef8102957dd06b42c9f7dc))
|
|
17
|
+
* add UserFieldEditorView component ([#2873](https://github.com/dynamic-labs/DynamicAuth/issues/2873)) ([7a6d1d7](https://github.com/dynamic-labs/DynamicAuth/commit/7a6d1d7057422e4ff5f4efebbf8f08eb7398c51d))
|
|
18
|
+
* e2e refresh on unsupported network ([#2915](https://github.com/dynamic-labs/DynamicAuth/issues/2915)) ([8504c73](https://github.com/dynamic-labs/DynamicAuth/commit/8504c73d75a057c695fe86b25d8bf42ff071efb4))
|
|
19
|
+
* introduces updateUserWithModal ([#2972](https://github.com/dynamic-labs/DynamicAuth/issues/2972)) ([883f500](https://github.com/dynamic-labs/DynamicAuth/commit/883f500f35e5db9dcaf073e049f67672e0115670))
|
|
20
|
+
* update wallet locked view ([#2892](https://github.com/dynamic-labs/DynamicAuth/issues/2892)) ([e3aaaca](https://github.com/dynamic-labs/DynamicAuth/commit/e3aaaca50c6335498b9e3938674b37524a001b49))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* input's css hiding submit button and label on autocomplete ([#2916](https://github.com/dynamic-labs/DynamicAuth/issues/2916)) ([d07acfc](https://github.com/dynamic-labs/DynamicAuth/commit/d07acfc627dd72fea690c0492190c995be9e6b2c))
|
|
26
|
+
* always enable magic connectors when enabled ([#3014](https://github.com/dynamic-labs/DynamicAuth/issues/3014)) ([ce33b43](https://github.com/dynamic-labs/DynamicAuth/commit/ce33b4336397d5d77863ce32746dc4e975d16f6a))
|
|
27
|
+
* **captcha:** complete sign in with magic and blocto ([#2967](https://github.com/dynamic-labs/DynamicAuth/issues/2967)) ([07e4cf7](https://github.com/dynamic-labs/DynamicAuth/commit/07e4cf7d3f8158e04ed6f78d1cc11b499da50eea))
|
|
28
|
+
* ensure social sign in embedded wallets sync correctly with wagmi ([#3043](https://github.com/dynamic-labs/DynamicAuth/issues/3043)) ([e139d38](https://github.com/dynamic-labs/DynamicAuth/commit/e139d38056bc2f20adbeff458ff6a9731e44a677))
|
|
29
|
+
* fix twitter linking ([#2918](https://github.com/dynamic-labs/DynamicAuth/issues/2918)) ([1511924](https://github.com/dynamic-labs/DynamicAuth/commit/1511924c89bb3bc12a290695a43f5db9e7d475f4))
|
|
30
|
+
* guard against null or undefined provider value when logging in with magic ([#3021](https://github.com/dynamic-labs/DynamicAuth/issues/3021)) ([7c1580a](https://github.com/dynamic-labs/DynamicAuth/commit/7c1580a782f0d6b30931a7f9c84f96416a7236cf))
|
|
31
|
+
* **GVTY-195:** issues with mergeUserAccountsView ([#2943](https://github.com/dynamic-labs/DynamicAuth/issues/2943)) ([b290132](https://github.com/dynamic-labs/DynamicAuth/commit/b29013269df539b4901f1f5fc688905f0f50548e))
|
|
32
|
+
* issue where walletconnectors are instantiated without walletbook ([#3020](https://github.com/dynamic-labs/DynamicAuth/issues/3020)) ([bb91c24](https://github.com/dynamic-labs/DynamicAuth/commit/bb91c24d4f03966f96c960eb04891846807ed49d))
|
|
33
|
+
* **Magic:** improve gas estimate for transactions ([#2929](https://github.com/dynamic-labs/DynamicAuth/issues/2929)) ([13dcb7a](https://github.com/dynamic-labs/DynamicAuth/commit/13dcb7a40a75e088fea81d51865dddf5391bcf83))
|
|
34
|
+
* missing enable isVerificationInProgress ([#2893](https://github.com/dynamic-labs/DynamicAuth/issues/2893)) ([bcd76a5](https://github.com/dynamic-labs/DynamicAuth/commit/bcd76a5b55f9e85872ff3dd9f5353b39ca47053b))
|
|
35
|
+
* **networks:** merge custom network after API networks ([#2925](https://github.com/dynamic-labs/DynamicAuth/issues/2925)) ([c2f53ca](https://github.com/dynamic-labs/DynamicAuth/commit/c2f53ca9ee3485ed26be4e7d7d255dbdb5a952d4))
|
|
36
|
+
* onBeforeConnectSuccessConfirmation is being called multiple times on network change ([#2917](https://github.com/dynamic-labs/DynamicAuth/issues/2917)) ([f873ca4](https://github.com/dynamic-labs/DynamicAuth/commit/f873ca47118796f277e37f5decf810503ee740bd))
|
|
37
|
+
* only use the production api environment of magicLink ([#3022](https://github.com/dynamic-labs/DynamicAuth/issues/3022)) ([cd86753](https://github.com/dynamic-labs/DynamicAuth/commit/cd867534262b8f77f5fa37344182181a7ea8d3c2))
|
|
38
|
+
* **QNTM-249:** broken email update when user is authenticated ([#2931](https://github.com/dynamic-labs/DynamicAuth/issues/2931)) ([5471ab1](https://github.com/dynamic-labs/DynamicAuth/commit/5471ab1b51f9bffdf1e36e1c2fac1fb9af06a067))
|
|
39
|
+
* reformat social sign-in text ([#2956](https://github.com/dynamic-labs/DynamicAuth/issues/2956)) ([0e149db](https://github.com/dynamic-labs/DynamicAuth/commit/0e149db5b661347145928f4de6ce932604ed7184))
|
|
40
|
+
* remove unused provider variable from OKX.spec.ts ([#2959](https://github.com/dynamic-labs/DynamicAuth/issues/2959)) ([6bc9d4d](https://github.com/dynamic-labs/DynamicAuth/commit/6bc9d4d51795ff46779650d929d8e0df3179e0b1))
|
|
41
|
+
* set error if user closes oauth window or if it times out ([#3050](https://github.com/dynamic-labs/DynamicAuth/issues/3050)) ([ef2b189](https://github.com/dynamic-labs/DynamicAuth/commit/ef2b189cbf650bf82382e538e7ce653fb677a22f))
|
|
42
|
+
* switching network in connected state should update wallets to connect list ([#2989](https://github.com/dynamic-labs/DynamicAuth/issues/2989)) ([f0553fd](https://github.com/dynamic-labs/DynamicAuth/commit/f0553fd24c27204e9ec7b7c12d6589ce92910553))
|
|
43
|
+
* sync wagmi correctly in connect-only mode ([#2990](https://github.com/dynamic-labs/DynamicAuth/issues/2990)) ([d15b6d5](https://github.com/dynamic-labs/DynamicAuth/commit/d15b6d5eb7349e872138d4394a1a155fdb67e6b4))
|
|
44
|
+
* **transactions:** send transaction with auto nonce ([#3049](https://github.com/dynamic-labs/DynamicAuth/issues/3049)) ([769cdce](https://github.com/dynamic-labs/DynamicAuth/commit/769cdce50fba786c94ac139fc031073513bbec3a))
|
|
45
|
+
* use ETH currency symbol for STARK chains ([#3005](https://github.com/dynamic-labs/DynamicAuth/issues/3005)) ([a43f184](https://github.com/dynamic-labs/DynamicAuth/commit/a43f184121463844a0934189290c8251db36d3dc))
|
|
46
|
+
* useSyncPrimaryWallet overrides views with "wallet-locked-view" ([#2861](https://github.com/dynamic-labs/DynamicAuth/issues/2861)) ([a21d9e4](https://github.com/dynamic-labs/DynamicAuth/commit/a21d9e42a900201b8f4039038ced50d59c763e8a))
|
|
47
|
+
* **wallet-list:** update key to distinguish wallet and wallet group ([#2909](https://github.com/dynamic-labs/DynamicAuth/issues/2909)) ([ce5055f](https://github.com/dynamic-labs/DynamicAuth/commit/ce5055febab9b8a479505d3f21b1cdf2b5091fd7))
|
|
48
|
+
|
|
49
|
+
## [0.19.0-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.0-alpha.0...v0.19.0-alpha.1) (2023-08-10)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### Features
|
|
53
|
+
|
|
54
|
+
* cleaning up email input field - delete continue button ([#2833](https://github.com/dynamic-labs/DynamicAuth/issues/2833)) ([baa399e](https://github.com/dynamic-labs/DynamicAuth/commit/baa399e387bce9570a7e7774d68dc3c92f86be1b))
|
|
55
|
+
* disable social buttons after provider is selected ([#2875](https://github.com/dynamic-labs/DynamicAuth/issues/2875)) ([6296ce1](https://github.com/dynamic-labs/DynamicAuth/commit/6296ce13062a8589cf6fb4741957dc9bf84552a2))
|
|
56
|
+
* **GVTY-65:** Allow Merging accounts when duplicated email in KYC step ([#2772](https://github.com/dynamic-labs/DynamicAuth/issues/2772)) ([8efb6ae](https://github.com/dynamic-labs/DynamicAuth/commit/8efb6aecc9445ef1798a5c6358eac27b16f661b6))
|
|
57
|
+
* hide network from nav if hideNetworkInDynamicWidget setting is true ([#2842](https://github.com/dynamic-labs/DynamicAuth/issues/2842)) ([f3dc9ba](https://github.com/dynamic-labs/DynamicAuth/commit/f3dc9ba987781d5d0540336f351bb9f148400eac))
|
|
58
|
+
* show email submit button on focus ([#2860](https://github.com/dynamic-labs/DynamicAuth/issues/2860)) ([87d8ae0](https://github.com/dynamic-labs/DynamicAuth/commit/87d8ae0806425a25835efda5f9b9abc58e5de18e))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
### Bug Fixes
|
|
62
|
+
|
|
63
|
+
* account already exist message not displaying automatically ([#2896](https://github.com/dynamic-labs/DynamicAuth/issues/2896)) ([ba56c93](https://github.com/dynamic-labs/DynamicAuth/commit/ba56c936546428b0a1111ab5ef6e8d0d9a463bb5))
|
|
64
|
+
* array of dynamicWagmiSettings not being sent, must be turned into object ([#2835](https://github.com/dynamic-labs/DynamicAuth/issues/2835)) ([092c45a](https://github.com/dynamic-labs/DynamicAuth/commit/092c45afd3676fbd7c3d28f51818470de7f95768))
|
|
65
|
+
* change network modal doesn't pop on secondary wallet, when primaryWallet was disconnected ([#2817](https://github.com/dynamic-labs/DynamicAuth/issues/2817)) ([b68c156](https://github.com/dynamic-labs/DynamicAuth/commit/b68c1565f936d2f4275b104a0881ba5720101abd))
|
|
66
|
+
* connectSuccess callback is not being called when connecting new wallet after unlink ([#2814](https://github.com/dynamic-labs/DynamicAuth/issues/2814)) ([d5b34d8](https://github.com/dynamic-labs/DynamicAuth/commit/d5b34d8a073436ce39280766608578fd97567fac))
|
|
67
|
+
* css variables are being ignored for ConnectButton component ([#2869](https://github.com/dynamic-labs/DynamicAuth/issues/2869)) ([a54fb46](https://github.com/dynamic-labs/DynamicAuth/commit/a54fb46648758001450a33e6d86cf04765507701))
|
|
68
|
+
* css variables for the ConnectButton are being ignored ([#2856](https://github.com/dynamic-labs/DynamicAuth/issues/2856)) ([65a342f](https://github.com/dynamic-labs/DynamicAuth/commit/65a342f828b6a16f714fc6b6e2066e1b742b2c0a))
|
|
69
|
+
* don't let user update email if it's linked to an embedded wallet ([#2883](https://github.com/dynamic-labs/DynamicAuth/issues/2883)) ([99aa303](https://github.com/dynamic-labs/DynamicAuth/commit/99aa3033e62c0dee14657cb811db8d5b3597f7de))
|
|
70
|
+
* **GVTY-150:** blocto pop up to sign after disconnect ([#2854](https://github.com/dynamic-labs/DynamicAuth/issues/2854)) ([df5481b](https://github.com/dynamic-labs/DynamicAuth/commit/df5481b2d5438848ad96cdee402f40b520bead08))
|
|
71
|
+
* **GVTY-155:** update to the new design ([#2889](https://github.com/dynamic-labs/DynamicAuth/issues/2889)) ([31f7f54](https://github.com/dynamic-labs/DynamicAuth/commit/31f7f54444c623fe7d5bcf8a42f94ee22eedc3e1))
|
|
72
|
+
* **GVTY-159:** email update view not showing email used error ([#2887](https://github.com/dynamic-labs/DynamicAuth/issues/2887)) ([bd40e4c](https://github.com/dynamic-labs/DynamicAuth/commit/bd40e4c77cda42752d44e42b98bfcea4cfd77a80))
|
|
73
|
+
* **OTPOverviewView:** enable close only on close button click ([#2877](https://github.com/dynamic-labs/DynamicAuth/issues/2877)) ([2be23e7](https://github.com/dynamic-labs/DynamicAuth/commit/2be23e7ddefe67c971d863ad9069ac5b8a74f4e5))
|
|
74
|
+
* **transaction:** improve gas estimate in transaction confirmation ([#2767](https://github.com/dynamic-labs/DynamicAuth/issues/2767)) ([7180ae5](https://github.com/dynamic-labs/DynamicAuth/commit/7180ae50559f924ae9769b2b8d87eadc6604c754))
|
|
75
|
+
* use findSocialIcon instead getSocialIcon to avoid render errors ([#2834](https://github.com/dynamic-labs/DynamicAuth/issues/2834)) ([2c57f98](https://github.com/dynamic-labs/DynamicAuth/commit/2c57f98fd5c461ae4acbe2836f719ebe18bc21fc))
|
|
76
|
+
* **useWalletConnectorEvent:** ensure connector is initialized ([#2849](https://github.com/dynamic-labs/DynamicAuth/issues/2849)) ([9137131](https://github.com/dynamic-labs/DynamicAuth/commit/913713166af8a6e6cc15a8e362e57b328fc0a76f))
|
|
77
|
+
* **wcv2:** simulate chain change event in switchNetwork ([#2809](https://github.com/dynamic-labs/DynamicAuth/issues/2809)) ([2329b80](https://github.com/dynamic-labs/DynamicAuth/commit/2329b808f57644cebb664be536bc41e256d108d8))
|
|
78
|
+
* wrong wallet list is showing after disconnecting and network change ([#2815](https://github.com/dynamic-labs/DynamicAuth/issues/2815)) ([6cae101](https://github.com/dynamic-labs/DynamicAuth/commit/6cae1019f40be4ffe7ab0426aa159c652a770a82))
|
|
79
|
+
|
|
2
80
|
## [0.19.0-alpha.0](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.0-RC.25...v0.19.0-alpha.0) (2023-08-01)
|
|
3
81
|
|
|
4
82
|
## [0.18.0-RC.25](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.0-RC.24...v0.18.0-RC.25) (2023-08-01)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/utils",
|
|
3
|
-
"version": "0.19.0-alpha.
|
|
3
|
+
"version": "0.19.0-alpha.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"./package.json": "./package.json"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@dynamic-labs/types": "0.19.0-alpha.
|
|
29
|
+
"@dynamic-labs/types": "0.19.0-alpha.2"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {}
|
|
32
32
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var DynamicError = require('./DynamicError.cjs');
|
|
6
|
+
|
|
7
|
+
class UserHasAccountWithEmailError extends DynamicError.DynamicError {
|
|
8
|
+
constructor(error) {
|
|
9
|
+
super(error);
|
|
10
|
+
this.error = error;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
exports.UserHasAccountWithEmailError = UserHasAccountWithEmailError;
|
package/src/errors/index.d.ts
CHANGED
package/src/index.cjs
CHANGED
|
@@ -18,6 +18,7 @@ var WalletUsedError = require('./errors/WalletUsedError.cjs');
|
|
|
18
18
|
var EmailProviderError = require('./errors/EmailProviderError.cjs');
|
|
19
19
|
var MissingEnvironmentIdError = require('./errors/MissingEnvironmentIdError.cjs');
|
|
20
20
|
var GateBlockedError = require('./errors/GateBlockedError.cjs');
|
|
21
|
+
var UserHasAccountWithEmailError = require('./errors/UserHasAccountWithEmailError.cjs');
|
|
21
22
|
var CancellablePromise = require('./CancellablePromise/CancellablePromise.cjs');
|
|
22
23
|
var isFunction = require('./isFunction/isFunction.cjs');
|
|
23
24
|
var isMobile = require('./isMobile.cjs');
|
|
@@ -42,6 +43,7 @@ exports.WalletUsedError = WalletUsedError.WalletUsedError;
|
|
|
42
43
|
exports.EmailProviderError = EmailProviderError.EmailProviderError;
|
|
43
44
|
exports.MissingEnvironmentIdError = MissingEnvironmentIdError.MissingEnvironmentIdError;
|
|
44
45
|
exports.GateBlockedError = GateBlockedError.GateBlockedError;
|
|
46
|
+
exports.UserHasAccountWithEmailError = UserHasAccountWithEmailError.UserHasAccountWithEmailError;
|
|
45
47
|
exports.CancellablePromise = CancellablePromise.CancellablePromise;
|
|
46
48
|
exports.isFunction = isFunction.isFunction;
|
|
47
49
|
exports.isAndroid = isMobile.isAndroid;
|
package/src/index.js
CHANGED
|
@@ -14,6 +14,7 @@ export { WalletUsedError } from './errors/WalletUsedError.js';
|
|
|
14
14
|
export { EmailProviderError } from './errors/EmailProviderError.js';
|
|
15
15
|
export { MissingEnvironmentIdError } from './errors/MissingEnvironmentIdError.js';
|
|
16
16
|
export { GateBlockedError } from './errors/GateBlockedError.js';
|
|
17
|
+
export { UserHasAccountWithEmailError } from './errors/UserHasAccountWithEmailError.js';
|
|
17
18
|
export { CancellablePromise } from './CancellablePromise/CancellablePromise.js';
|
|
18
19
|
export { isFunction } from './isFunction/isFunction.js';
|
|
19
20
|
export { isAndroid, isIOS, isIPad, isIPhone, isLegacySafari, isMobile, isSamsungBrowser } from './isMobile.js';
|