@dynamic-labs/ethereum 1.1.0-alpha.7 → 1.1.0-alpha.9
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 +31 -0
- package/package.json +7 -7
- package/src/injected/PhantomEvm.cjs +4 -9
- package/src/injected/PhantomEvm.js +5 -10
- package/src/walletConnect/client/client.cjs +2 -2
- package/src/walletConnect/client/client.d.ts +1 -1
- package/src/walletConnect/client/client.js +2 -2
- package/src/walletConnect/walletConnect.cjs +1 -1
- package/src/walletConnect/walletConnect.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,35 @@
|
|
|
1
1
|
|
|
2
|
+
## [1.1.0-alpha.9](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.8...v1.1.0-alpha.9) (2024-01-04)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add solana magic support ([#4258](https://github.com/dynamic-labs/DynamicAuth/issues/4258)) ([da726aa](https://github.com/dynamic-labs/DynamicAuth/commit/da726aa78466c52ee3e1f18952e4351cde754cbc))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* edge case with unlinking wallet ([#4285](https://github.com/dynamic-labs/DynamicAuth/issues/4285)) ([1057fe4](https://github.com/dynamic-labs/DynamicAuth/commit/1057fe47599381f5d9dc39ce4cbeca2041c70319))
|
|
13
|
+
* remove normalizeWalletName from DynamicAuth ([5592817](https://github.com/dynamic-labs/DynamicAuth/commit/5592817b62e345319e04cca9a98276ffad87cfc2))
|
|
14
|
+
* **useFetchBalance:** ensure the latest wallet balance is fetched ([#4288](https://github.com/dynamic-labs/DynamicAuth/issues/4288)) ([25dd035](https://github.com/dynamic-labs/DynamicAuth/commit/25dd035cf8893b7cd28f550026134ba0eecda142))
|
|
15
|
+
|
|
16
|
+
## [1.1.0-alpha.8](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.7...v1.1.0-alpha.8) (2024-01-03)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* add new sdk view section for text ([#4280](https://github.com/dynamic-labs/DynamicAuth/issues/4280)) ([457ae38](https://github.com/dynamic-labs/DynamicAuth/commit/457ae38cd2be8dae078f40b54ffc4704299d4ed9))
|
|
22
|
+
* add new setShowLinkNewWalletModal method ([f46447a](https://github.com/dynamic-labs/DynamicAuth/commit/f46447ab606f4fdbf55e5fef21dd98f8f2650e90))
|
|
23
|
+
* add pk export for hd wallets ([#4266](https://github.com/dynamic-labs/DynamicAuth/issues/4266)) ([44aac69](https://github.com/dynamic-labs/DynamicAuth/commit/44aac69580ed44e66eab971f87cb6061a3fadc90))
|
|
24
|
+
* add starknet support for sopelia ([#4248](https://github.com/dynamic-labs/DynamicAuth/issues/4248)) ([f9a0980](https://github.com/dynamic-labs/DynamicAuth/commit/f9a0980c3cd2d6d95c5dd17b179fbd0931f08b1a))
|
|
25
|
+
* enable hardware wallet for solana wallets ([#4275](https://github.com/dynamic-labs/DynamicAuth/issues/4275)) ([704b380](https://github.com/dynamic-labs/DynamicAuth/commit/704b380186618a5a5793e88f36ccbe84b59a2e4a))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* phantom solana not connecting on mobile ([#4284](https://github.com/dynamic-labs/DynamicAuth/issues/4284)) ([6ad75f1](https://github.com/dynamic-labs/DynamicAuth/commit/6ad75f152896459f5cf658227f998c246b6a572b))
|
|
31
|
+
* use bitcoin payment address for onramp ([#4273](https://github.com/dynamic-labs/DynamicAuth/issues/4273)) ([a2f54e8](https://github.com/dynamic-labs/DynamicAuth/commit/a2f54e812a11a91ee488eca64f14b5eeea1a8874))
|
|
32
|
+
|
|
2
33
|
## [1.1.0-alpha.7](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.6...v1.1.0-alpha.7) (2023-12-28)
|
|
3
34
|
|
|
4
35
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/ethereum",
|
|
3
|
-
"version": "1.1.0-alpha.
|
|
3
|
+
"version": "1.1.0-alpha.9",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"@walletconnect/universal-provider": "2.10.6",
|
|
33
33
|
"eventemitter3": "5.0.1",
|
|
34
34
|
"buffer": "6.0.3",
|
|
35
|
-
"@dynamic-labs/rpc-providers": "1.1.0-alpha.
|
|
36
|
-
"@dynamic-labs/turnkey": "1.1.0-alpha.
|
|
37
|
-
"@dynamic-labs/types": "1.1.0-alpha.
|
|
38
|
-
"@dynamic-labs/utils": "1.1.0-alpha.
|
|
39
|
-
"@dynamic-labs/wallet-book": "1.1.0-alpha.
|
|
40
|
-
"@dynamic-labs/wallet-connector-core": "1.1.0-alpha.
|
|
35
|
+
"@dynamic-labs/rpc-providers": "1.1.0-alpha.9",
|
|
36
|
+
"@dynamic-labs/turnkey": "1.1.0-alpha.9",
|
|
37
|
+
"@dynamic-labs/types": "1.1.0-alpha.9",
|
|
38
|
+
"@dynamic-labs/utils": "1.1.0-alpha.9",
|
|
39
|
+
"@dynamic-labs/wallet-book": "1.1.0-alpha.9",
|
|
40
|
+
"@dynamic-labs/wallet-connector-core": "1.1.0-alpha.9",
|
|
41
41
|
"stream": "0.0.2"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
@@ -21,16 +21,11 @@ class PhantomEvm extends InjectedWalletBase {
|
|
|
21
21
|
if (this.isInstalledOnBrowser()) {
|
|
22
22
|
return _super.fetchPublicAddress.call(this);
|
|
23
23
|
}
|
|
24
|
-
const url = encodeURIComponent(window.location.toString());
|
|
25
|
-
const ref = encodeURIComponent(window.location.origin);
|
|
26
|
-
// samsung browser only supports native links, not universal links
|
|
27
24
|
if (utils.isMobile()) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
window.location.assign(`https://phantom.app/ul/browse/${url}?ref=${ref}`);
|
|
33
|
-
}
|
|
25
|
+
utils.handleMobileWalletRedirect({
|
|
26
|
+
nativeLink: 'phantom://browse',
|
|
27
|
+
universalLink: 'https://phantom.app/ul/browse',
|
|
28
|
+
});
|
|
34
29
|
}
|
|
35
30
|
return undefined;
|
|
36
31
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __awaiter } from '../../_virtual/_tslib.js';
|
|
2
|
-
import { isMobile,
|
|
2
|
+
import { isMobile, handleMobileWalletRedirect } from '@dynamic-labs/utils';
|
|
3
3
|
import { findWalletBookWallet } from '@dynamic-labs/wallet-book';
|
|
4
4
|
import InjectedWalletBase from './InjectedWalletBase.js';
|
|
5
5
|
|
|
@@ -17,16 +17,11 @@ class PhantomEvm extends InjectedWalletBase {
|
|
|
17
17
|
if (this.isInstalledOnBrowser()) {
|
|
18
18
|
return _super.fetchPublicAddress.call(this);
|
|
19
19
|
}
|
|
20
|
-
const url = encodeURIComponent(window.location.toString());
|
|
21
|
-
const ref = encodeURIComponent(window.location.origin);
|
|
22
|
-
// samsung browser only supports native links, not universal links
|
|
23
20
|
if (isMobile()) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
window.location.assign(`https://phantom.app/ul/browse/${url}?ref=${ref}`);
|
|
29
|
-
}
|
|
21
|
+
handleMobileWalletRedirect({
|
|
22
|
+
nativeLink: 'phantom://browse',
|
|
23
|
+
universalLink: 'https://phantom.app/ul/browse',
|
|
24
|
+
});
|
|
30
25
|
}
|
|
31
26
|
return undefined;
|
|
32
27
|
});
|
|
@@ -12,8 +12,8 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
|
|
13
13
|
var Client__default = /*#__PURE__*/_interopDefaultLegacy(Client);
|
|
14
14
|
|
|
15
|
-
const initClient = (
|
|
16
|
-
const storageId = `walletconnect-${
|
|
15
|
+
const initClient = (key, bridge, settings) => {
|
|
16
|
+
const storageId = `walletconnect-${key}`;
|
|
17
17
|
const session = localStorage.getItem(storageId);
|
|
18
18
|
const clientArgs = session
|
|
19
19
|
? { session: JSON.parse(session), storageId }
|
|
@@ -2,7 +2,7 @@ import Client from '@walletconnect/client';
|
|
|
2
2
|
import { PublicClient } from 'viem';
|
|
3
3
|
import { FetchPublicAddressOpts, PayloadParams, DeepLinkVariant, WalletConnector } from '@dynamic-labs/wallet-connector-core';
|
|
4
4
|
import { WalletSchema } from '@dynamic-labs/wallet-book';
|
|
5
|
-
export declare const initClient: (
|
|
5
|
+
export declare const initClient: (key: string, bridge: string, settings?: any) => Client;
|
|
6
6
|
/**
|
|
7
7
|
* Attach event handlers to WalletConnect events.
|
|
8
8
|
*/
|
|
@@ -4,8 +4,8 @@ import { hashMessage } from 'viem';
|
|
|
4
4
|
import { isSameAddress, logger, performPlatformSpecificConnectionMethod, getDeepLink } from '@dynamic-labs/wallet-connector-core';
|
|
5
5
|
import { isMobile } from '@dynamic-labs/utils';
|
|
6
6
|
|
|
7
|
-
const initClient = (
|
|
8
|
-
const storageId = `walletconnect-${
|
|
7
|
+
const initClient = (key, bridge, settings) => {
|
|
8
|
+
const storageId = `walletconnect-${key}`;
|
|
9
9
|
const session = localStorage.getItem(storageId);
|
|
10
10
|
const clientArgs = session
|
|
11
11
|
? { session: JSON.parse(session), storageId }
|
|
@@ -36,7 +36,7 @@ class WalletConnect extends EthWalletConnector.EthWalletConnector {
|
|
|
36
36
|
if (this.client) {
|
|
37
37
|
return this.client;
|
|
38
38
|
}
|
|
39
|
-
this.client = client.initClient(
|
|
39
|
+
this.client = client.initClient(this.key, this.bridge, this.clientOptions);
|
|
40
40
|
return this.client;
|
|
41
41
|
}
|
|
42
42
|
supportsNetworkSwitching() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __rest, __awaiter } from '../../_virtual/_tslib.js';
|
|
2
2
|
import WalletConnectProvider from '@walletconnect/ethereum-provider';
|
|
3
3
|
import { createWalletClient, custom } from 'viem';
|
|
4
|
-
import {
|
|
4
|
+
import { getDeepLink } from '@dynamic-labs/wallet-connector-core';
|
|
5
5
|
import { getWalletBookWallet } from '@dynamic-labs/wallet-book';
|
|
6
6
|
import { isMobile, DynamicError } from '@dynamic-labs/utils';
|
|
7
7
|
import { EthWalletConnector } from '../EthWalletConnector.js';
|
|
@@ -28,7 +28,7 @@ class WalletConnect extends EthWalletConnector {
|
|
|
28
28
|
if (this.client) {
|
|
29
29
|
return this.client;
|
|
30
30
|
}
|
|
31
|
-
this.client = initClient(
|
|
31
|
+
this.client = initClient(this.key, this.bridge, this.clientOptions);
|
|
32
32
|
return this.client;
|
|
33
33
|
}
|
|
34
34
|
supportsNetworkSwitching() {
|