@dynamic-labs/multi-wallet 0.19.0-alpha.6 → 0.19.0-alpha.8
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 +47 -0
- package/package.json +7 -7
- package/src/multi-wallet.cjs +9 -8
- package/src/multi-wallet.js +9 -8
- package/src/types.d.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,51 @@
|
|
|
1
1
|
|
|
2
|
+
## [0.19.0-alpha.8](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.0-alpha.7...v0.19.0-alpha.8) (2023-09-11)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add onSignedMessage callback ([#3118](https://github.com/dynamic-labs/DynamicAuth/issues/3118)) ([acc36f6](https://github.com/dynamic-labs/DynamicAuth/commit/acc36f6cf584eb05a019027475a6e2e413fd6bd5))
|
|
8
|
+
* add social sign-in without embedded wallet ([#3172](https://github.com/dynamic-labs/DynamicAuth/issues/3172)) ([ff1acc6](https://github.com/dynamic-labs/DynamicAuth/commit/ff1acc6d9753ba745ac01c5ef6d26f2e4291b752))
|
|
9
|
+
* show default wallet icon when image breaks ([#3234](https://github.com/dynamic-labs/DynamicAuth/issues/3234)) ([657e6bb](https://github.com/dynamic-labs/DynamicAuth/commit/657e6bbc1cdcd840562d25194a827ea833237c1a))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* catch error sending sdkSettings and log warning ([#3274](https://github.com/dynamic-labs/DynamicAuth/issues/3274)) ([fcbe01b](https://github.com/dynamic-labs/DynamicAuth/commit/fcbe01bc733a73f38aebd6ffb0969b040dd2f781))
|
|
15
|
+
* detect if oauth popup is blocked and throw error ([#3250](https://github.com/dynamic-labs/DynamicAuth/issues/3250)) ([b87ddf3](https://github.com/dynamic-labs/DynamicAuth/commit/b87ddf399104e29c56566abbbecab6ff947992d6))
|
|
16
|
+
* display error message to user if social account already exits ([#3258](https://github.com/dynamic-labs/DynamicAuth/issues/3258)) ([bb52cb4](https://github.com/dynamic-labs/DynamicAuth/commit/bb52cb4ae42d89310d435584ed4ece126f9b6a4a))
|
|
17
|
+
* don't call callbacks if window closed due to oauth process complete ([#3252](https://github.com/dynamic-labs/DynamicAuth/issues/3252)) ([09a3c73](https://github.com/dynamic-labs/DynamicAuth/commit/09a3c73446aa337f24e0875cd4a0af617ea8ca84))
|
|
18
|
+
* issue where unexpected token would occur when bundlers defined process.env ([#3283](https://github.com/dynamic-labs/DynamicAuth/issues/3283)) ([d31d0a4](https://github.com/dynamic-labs/DynamicAuth/commit/d31d0a4011256f59cb3760acdc2c3dfe6c5b504a))
|
|
19
|
+
* login view layout updates ([#3231](https://github.com/dynamic-labs/DynamicAuth/issues/3231)) ([7762d06](https://github.com/dynamic-labs/DynamicAuth/commit/7762d067bdd4b3f313a15308262f18dac0b961ab))
|
|
20
|
+
* **MagicWalletConnector:** remove async from getWeb3Provider method ([#3230](https://github.com/dynamic-labs/DynamicAuth/issues/3230)) ([69356e9](https://github.com/dynamic-labs/DynamicAuth/commit/69356e9b0bd1800acdf24fc96c72b094b595eaa7))
|
|
21
|
+
* remove react component props from sending to sdk api ([#3282](https://github.com/dynamic-labs/DynamicAuth/issues/3282)) ([b0d8f2b](https://github.com/dynamic-labs/DynamicAuth/commit/b0d8f2b9dd0856a5a7bd862f6c3499b65ec29f64))
|
|
22
|
+
* seprate ls checks for dynamiccontext and wagmi settings ([#3275](https://github.com/dynamic-labs/DynamicAuth/issues/3275)) ([aa4e756](https://github.com/dynamic-labs/DynamicAuth/commit/aa4e756a10310ce216b5942d0d6845f7092a89a2))
|
|
23
|
+
* use context to handle social sign-in and display message while processing ([#3216](https://github.com/dynamic-labs/DynamicAuth/issues/3216)) ([0e3ce73](https://github.com/dynamic-labs/DynamicAuth/commit/0e3ce73eafbb8d5725377c9a8cbd86a82d6c525f))
|
|
24
|
+
* **wallet-connect-v2:** use appropriate default chain id with WC v2 ([#3218](https://github.com/dynamic-labs/DynamicAuth/issues/3218)) ([2e6e7be](https://github.com/dynamic-labs/DynamicAuth/commit/2e6e7beb801ea5a8dc7429970bcd1e705610d605))
|
|
25
|
+
|
|
26
|
+
## [0.19.0-alpha.7](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.0-alpha.6...v0.19.0-alpha.7) (2023-08-31)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
* include deepLinkPreference option for wallet connect deep linking mode ([#3174](https://github.com/dynamic-labs/DynamicAuth/issues/3174)) ([f715948](https://github.com/dynamic-labs/DynamicAuth/commit/f715948050ddab52373ab742ea47cfc0879842ae))
|
|
32
|
+
* add option to disable the locked wallet view ([#3184](https://github.com/dynamic-labs/DynamicAuth/issues/3184)) ([d9a1290](https://github.com/dynamic-labs/DynamicAuth/commit/d9a1290214b7f86337abb544acd96f65ffe37759))
|
|
33
|
+
* migrate starknet version to v5 ([#3153](https://github.com/dynamic-labs/DynamicAuth/issues/3153)) ([b674011](https://github.com/dynamic-labs/DynamicAuth/commit/b67401133bf75d416118b51be11e3f099d2e2cda))
|
|
34
|
+
* add editable text with react i18next ([#3170](https://github.com/dynamic-labs/DynamicAuth/issues/3170)) ([a46b2ca](https://github.com/dynamic-labs/DynamicAuth/commit/a46b2ca880a4e14356024d2936920f72c8bc447e))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
* allow to select L2 wallet after changing L1 network ([#3158](https://github.com/dynamic-labs/DynamicAuth/issues/3158)) ([cf68472](https://github.com/dynamic-labs/DynamicAuth/commit/cf6847270181f7fd33537ac1ff2a03e70b67daf2))
|
|
40
|
+
* allow user to cancel magic login to choose another email ([#3123](https://github.com/dynamic-labs/DynamicAuth/issues/3123)) ([cd73d6d](https://github.com/dynamic-labs/DynamicAuth/commit/cd73d6d0500c313dda01bca6245c52d2d8fca93a))
|
|
41
|
+
* verify email OTP when email is updated ([#3168](https://github.com/dynamic-labs/DynamicAuth/issues/3168)) ([641eeb6](https://github.com/dynamic-labs/DynamicAuth/commit/641eeb685b0c9d77cc72912f29b137c699c192f0))
|
|
42
|
+
* end connector session when unlinking in bridge ([#3120](https://github.com/dynamic-labs/DynamicAuth/issues/3120)) ([4c15da2](https://github.com/dynamic-labs/DynamicAuth/commit/4c15da27646c7bd176f6080dee6d76833e30f8a1))
|
|
43
|
+
* improves loading the sdk setting once per session ([#3189](https://github.com/dynamic-labs/DynamicAuth/issues/3189)) ([c9b0241](https://github.com/dynamic-labs/DynamicAuth/commit/c9b0241da28d2a73c90fd7643280c8632772c90b))
|
|
44
|
+
* update wallet address when switching network on bridge ([#3171](https://github.com/dynamic-labs/DynamicAuth/issues/3171)) ([f35f35e](https://github.com/dynamic-labs/DynamicAuth/commit/f35f35e632bcf88794884b66e0466cdf2e924812))
|
|
45
|
+
* updates the user email when updateUserWithModal method is used ([#3186](https://github.com/dynamic-labs/DynamicAuth/issues/3186)) ([8c71863](https://github.com/dynamic-labs/DynamicAuth/commit/8c718632cef0165328b929c27b6eef313641458d))
|
|
46
|
+
* sign message for embedded wallet when auth mode is connect only ([#3185](https://github.com/dynamic-labs/DynamicAuth/issues/3185)) ([0e3859c](https://github.com/dynamic-labs/DynamicAuth/commit/0e3859cfc738d3ecf8f19976e5cdaebc0c4f01c9))
|
|
47
|
+
* sync wagmi with wallet connector ([#3149](https://github.com/dynamic-labs/DynamicAuth/issues/3149)) ([3216e15](https://github.com/dynamic-labs/DynamicAuth/commit/3216e1570ac12ded6b3ce50b7efb762fe6814815))
|
|
48
|
+
|
|
2
49
|
## [0.19.0-alpha.6](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.0-alpha.5...v0.19.0-alpha.6) (2023-08-25)
|
|
3
50
|
|
|
4
51
|
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/multi-wallet",
|
|
3
|
-
"version": "0.19.0-alpha.
|
|
3
|
+
"version": "0.19.0-alpha.8",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
7
7
|
"directory": "packages/multi-wallet"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@dynamic-labs/sdk-api": "0.0.
|
|
10
|
+
"@dynamic-labs/sdk-api": "0.0.272",
|
|
11
11
|
"ethers": "5.7.2",
|
|
12
12
|
"tslib": "2.4.1",
|
|
13
|
-
"@dynamic-labs/rpc-providers": "0.19.0-alpha.
|
|
14
|
-
"@dynamic-labs/types": "0.19.0-alpha.
|
|
15
|
-
"@dynamic-labs/utils": "0.19.0-alpha.
|
|
16
|
-
"@dynamic-labs/wallet-book": "0.19.0-alpha.
|
|
17
|
-
"@dynamic-labs/wallet-connector-core": "0.19.0-alpha.
|
|
13
|
+
"@dynamic-labs/rpc-providers": "0.19.0-alpha.8",
|
|
14
|
+
"@dynamic-labs/types": "0.19.0-alpha.8",
|
|
15
|
+
"@dynamic-labs/utils": "0.19.0-alpha.8",
|
|
16
|
+
"@dynamic-labs/wallet-book": "0.19.0-alpha.8",
|
|
17
|
+
"@dynamic-labs/wallet-connector-core": "0.19.0-alpha.8"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@walletconnect/types": "2.4.2"
|
package/src/multi-wallet.cjs
CHANGED
|
@@ -20,7 +20,7 @@ const defaultWalletUiUtils = {
|
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
22
|
const getSupportedWallets = (args) => {
|
|
23
|
-
const { appLogoUrl = '', appName = '', chainRpcProviders, flowNetwork, isWalletConnectV2Enabled = false, networkConfigurations = { cosmos: [], evm: [], solana: [], starknet: [] }, customerApiProviders = [], skipMemo = false, walletConnectProjectId = '', walletConnectorsProp, walletUiUtils = undefined, walletBook, walletConnectV1Bridge, } = args;
|
|
23
|
+
const { appLogoUrl = '', appName = '', chainRpcProviders, deepLinkPreference, flowNetwork, isWalletConnectV2Enabled = false, networkConfigurations = { cosmos: [], evm: [], solana: [], starknet: [] }, customerApiProviders = [], skipMemo = false, walletConnectProjectId = '', walletConnectorsProp, walletUiUtils = undefined, walletBook, walletConnectV1Bridge, } = args;
|
|
24
24
|
if (!skipMemo && wallets.length > 0) {
|
|
25
25
|
return wallets;
|
|
26
26
|
}
|
|
@@ -35,6 +35,7 @@ const getSupportedWallets = (args) => {
|
|
|
35
35
|
appName,
|
|
36
36
|
chainRpcProviders,
|
|
37
37
|
cosmosNetworks: cosmosNetworkConfigs,
|
|
38
|
+
deepLinkPreference,
|
|
38
39
|
evmNetworks: evmNetworkConfigs,
|
|
39
40
|
flowNetwork,
|
|
40
41
|
isWalletConnectV2Enabled,
|
|
@@ -57,14 +58,14 @@ const getSupportedWallets = (args) => {
|
|
|
57
58
|
return wallets;
|
|
58
59
|
};
|
|
59
60
|
const applyLinksOverrides = (walletBook$1, wallets) => wallets.map((wallet) => {
|
|
60
|
-
const metadata = walletBook.getWalletBookWallet(walletBook$1, wallet.
|
|
61
|
+
const metadata = walletBook.getWalletBookWallet(walletBook$1, wallet.key);
|
|
61
62
|
if (metadata.switchNetworkOnlyFromWallet !== undefined) {
|
|
62
63
|
wallet.switchNetworkOnlyFromWallet = metadata.switchNetworkOnlyFromWallet;
|
|
63
64
|
}
|
|
64
65
|
return wallet;
|
|
65
66
|
});
|
|
66
67
|
const filterWalletsForPlatform = (walletBook$1, wallets) => wallets.filter((wallet) => {
|
|
67
|
-
const metadata = walletBook.getWalletBookWallet(walletBook$1, wallet.
|
|
68
|
+
const metadata = walletBook.getWalletBookWallet(walletBook$1, wallet.key);
|
|
68
69
|
if (wallet.isInstalledOnBrowser()) {
|
|
69
70
|
return true;
|
|
70
71
|
}
|
|
@@ -78,10 +79,10 @@ const filterWalletsForPlatform = (walletBook$1, wallets) => wallets.filter((wall
|
|
|
78
79
|
return true;
|
|
79
80
|
}
|
|
80
81
|
else {
|
|
81
|
-
return handleMobileWalletFilter(walletBook$1, wallet.
|
|
82
|
+
return handleMobileWalletFilter(walletBook$1, wallet.key, metadata);
|
|
82
83
|
}
|
|
83
84
|
});
|
|
84
|
-
const handleMobileWalletFilter = (walletBook$1,
|
|
85
|
+
const handleMobileWalletFilter = (walletBook$1, walletKey, metadata) => {
|
|
85
86
|
if (!metadata.mobile)
|
|
86
87
|
return false;
|
|
87
88
|
/**
|
|
@@ -93,13 +94,13 @@ const handleMobileWalletFilter = (walletBook$1, walletName, metadata) => {
|
|
|
93
94
|
const hasWalletConnectLink = Boolean(metadata.mobile.universal) || Boolean(metadata.mobile.native);
|
|
94
95
|
const isWalletConnectWallet = metadata.walletConnect !== undefined;
|
|
95
96
|
if (utils.isIPad() || utils.isIPhone()) {
|
|
96
|
-
const hasIOSLink = Boolean(walletBook.getWalletLinks(walletBook$1,
|
|
97
|
+
const hasIOSLink = Boolean(walletBook.getWalletLinks(walletBook$1, walletKey).ios);
|
|
97
98
|
return !isWalletConnectWallet
|
|
98
99
|
? hasIOSLink
|
|
99
100
|
: hasIOSLink && hasWalletConnectLink;
|
|
100
101
|
}
|
|
101
102
|
else {
|
|
102
|
-
const hasAndroidLink = Boolean(walletBook.getWalletLinks(walletBook$1,
|
|
103
|
+
const hasAndroidLink = Boolean(walletBook.getWalletLinks(walletBook$1, walletKey).android);
|
|
103
104
|
return !isWalletConnectWallet
|
|
104
105
|
? hasAndroidLink
|
|
105
106
|
: hasAndroidLink && hasWalletConnectLink;
|
|
@@ -111,7 +112,7 @@ const chainStringToChains = {
|
|
|
111
112
|
};
|
|
112
113
|
const getSupportedChainsForWalletConnector = (walletBook$1, walletConnector) => {
|
|
113
114
|
var _a;
|
|
114
|
-
const metadata = walletBook.getWalletBookWallet(walletBook$1, walletConnector.
|
|
115
|
+
const metadata = walletBook.getWalletBookWallet(walletBook$1, walletConnector.key);
|
|
115
116
|
/**
|
|
116
117
|
* chains could contain multiple eth networks eg
|
|
117
118
|
* "eip155:1",
|
package/src/multi-wallet.js
CHANGED
|
@@ -16,7 +16,7 @@ const defaultWalletUiUtils = {
|
|
|
16
16
|
},
|
|
17
17
|
};
|
|
18
18
|
const getSupportedWallets = (args) => {
|
|
19
|
-
const { appLogoUrl = '', appName = '', chainRpcProviders, flowNetwork, isWalletConnectV2Enabled = false, networkConfigurations = { cosmos: [], evm: [], solana: [], starknet: [] }, customerApiProviders = [], skipMemo = false, walletConnectProjectId = '', walletConnectorsProp, walletUiUtils = undefined, walletBook, walletConnectV1Bridge, } = args;
|
|
19
|
+
const { appLogoUrl = '', appName = '', chainRpcProviders, deepLinkPreference, flowNetwork, isWalletConnectV2Enabled = false, networkConfigurations = { cosmos: [], evm: [], solana: [], starknet: [] }, customerApiProviders = [], skipMemo = false, walletConnectProjectId = '', walletConnectorsProp, walletUiUtils = undefined, walletBook, walletConnectV1Bridge, } = args;
|
|
20
20
|
if (!skipMemo && wallets.length > 0) {
|
|
21
21
|
return wallets;
|
|
22
22
|
}
|
|
@@ -31,6 +31,7 @@ const getSupportedWallets = (args) => {
|
|
|
31
31
|
appName,
|
|
32
32
|
chainRpcProviders,
|
|
33
33
|
cosmosNetworks: cosmosNetworkConfigs,
|
|
34
|
+
deepLinkPreference,
|
|
34
35
|
evmNetworks: evmNetworkConfigs,
|
|
35
36
|
flowNetwork,
|
|
36
37
|
isWalletConnectV2Enabled,
|
|
@@ -53,14 +54,14 @@ const getSupportedWallets = (args) => {
|
|
|
53
54
|
return wallets;
|
|
54
55
|
};
|
|
55
56
|
const applyLinksOverrides = (walletBook, wallets) => wallets.map((wallet) => {
|
|
56
|
-
const metadata = getWalletBookWallet(walletBook, wallet.
|
|
57
|
+
const metadata = getWalletBookWallet(walletBook, wallet.key);
|
|
57
58
|
if (metadata.switchNetworkOnlyFromWallet !== undefined) {
|
|
58
59
|
wallet.switchNetworkOnlyFromWallet = metadata.switchNetworkOnlyFromWallet;
|
|
59
60
|
}
|
|
60
61
|
return wallet;
|
|
61
62
|
});
|
|
62
63
|
const filterWalletsForPlatform = (walletBook, wallets) => wallets.filter((wallet) => {
|
|
63
|
-
const metadata = getWalletBookWallet(walletBook, wallet.
|
|
64
|
+
const metadata = getWalletBookWallet(walletBook, wallet.key);
|
|
64
65
|
if (wallet.isInstalledOnBrowser()) {
|
|
65
66
|
return true;
|
|
66
67
|
}
|
|
@@ -74,10 +75,10 @@ const filterWalletsForPlatform = (walletBook, wallets) => wallets.filter((wallet
|
|
|
74
75
|
return true;
|
|
75
76
|
}
|
|
76
77
|
else {
|
|
77
|
-
return handleMobileWalletFilter(walletBook, wallet.
|
|
78
|
+
return handleMobileWalletFilter(walletBook, wallet.key, metadata);
|
|
78
79
|
}
|
|
79
80
|
});
|
|
80
|
-
const handleMobileWalletFilter = (walletBook,
|
|
81
|
+
const handleMobileWalletFilter = (walletBook, walletKey, metadata) => {
|
|
81
82
|
if (!metadata.mobile)
|
|
82
83
|
return false;
|
|
83
84
|
/**
|
|
@@ -89,13 +90,13 @@ const handleMobileWalletFilter = (walletBook, walletName, metadata) => {
|
|
|
89
90
|
const hasWalletConnectLink = Boolean(metadata.mobile.universal) || Boolean(metadata.mobile.native);
|
|
90
91
|
const isWalletConnectWallet = metadata.walletConnect !== undefined;
|
|
91
92
|
if (isIPad() || isIPhone()) {
|
|
92
|
-
const hasIOSLink = Boolean(getWalletLinks(walletBook,
|
|
93
|
+
const hasIOSLink = Boolean(getWalletLinks(walletBook, walletKey).ios);
|
|
93
94
|
return !isWalletConnectWallet
|
|
94
95
|
? hasIOSLink
|
|
95
96
|
: hasIOSLink && hasWalletConnectLink;
|
|
96
97
|
}
|
|
97
98
|
else {
|
|
98
|
-
const hasAndroidLink = Boolean(getWalletLinks(walletBook,
|
|
99
|
+
const hasAndroidLink = Boolean(getWalletLinks(walletBook, walletKey).android);
|
|
99
100
|
return !isWalletConnectWallet
|
|
100
101
|
? hasAndroidLink
|
|
101
102
|
: hasAndroidLink && hasWalletConnectLink;
|
|
@@ -107,7 +108,7 @@ const chainStringToChains = {
|
|
|
107
108
|
};
|
|
108
109
|
const getSupportedChainsForWalletConnector = (walletBook, walletConnector) => {
|
|
109
110
|
var _a;
|
|
110
|
-
const metadata = getWalletBookWallet(walletBook, walletConnector.
|
|
111
|
+
const metadata = getWalletBookWallet(walletBook, walletConnector.key);
|
|
111
112
|
/**
|
|
112
113
|
* chains could contain multiple eth networks eg
|
|
113
114
|
* "eip155:1",
|
package/src/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Provider } from '@dynamic-labs/sdk-api';
|
|
2
|
-
import { WalletConnector, Chain, WalletConnectorsMethod } from '@dynamic-labs/wallet-connector-core';
|
|
2
|
+
import { WalletConnector, Chain, WalletConnectorsMethod, DeepLinkVariant } from '@dynamic-labs/wallet-connector-core';
|
|
3
3
|
import { NetworkConfigurationMap, WalletUiUtils } from '@dynamic-labs/types';
|
|
4
4
|
import { ChainRpcProviders } from '@dynamic-labs/rpc-providers';
|
|
5
5
|
import { WalletBookSchema } from '@dynamic-labs/wallet-book';
|
|
@@ -8,6 +8,7 @@ export type GetSupportedWalletsOpts = {
|
|
|
8
8
|
appName?: string;
|
|
9
9
|
chainRpcProviders: typeof ChainRpcProviders;
|
|
10
10
|
customerApiProviders?: Provider[];
|
|
11
|
+
deepLinkPreference?: DeepLinkVariant;
|
|
11
12
|
flowNetwork?: 'mainnet' | 'testnet';
|
|
12
13
|
isWalletConnectV2Enabled?: boolean;
|
|
13
14
|
networkConfigurations?: NetworkConfigurationMap;
|