@dynamic-labs/ethereum 2.1.0-alpha.27 → 2.1.0-alpha.28
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 +12 -0
- package/package.json +8 -8
- package/src/coinbase/helpers.cjs +12 -6
- package/src/coinbase/helpers.js +12 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
|
|
2
|
+
## [2.1.0-alpha.28](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.27...v2.1.0-alpha.28) (2024-05-29)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* adds solana standard wallet connector ([#5752](https://github.com/dynamic-labs/DynamicAuth/issues/5752)) ([0040940](https://github.com/dynamic-labs/DynamicAuth/commit/0040940fd1adb37ab3106bb0e4dfe79403bc41f2))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* farcaster fetch url fix ([#5767](https://github.com/dynamic-labs/DynamicAuth/issues/5767)) ([1408ba9](https://github.com/dynamic-labs/DynamicAuth/commit/1408ba92680363b9db7820a63d5e3d15dc26ad22))
|
|
13
|
+
|
|
2
14
|
## [2.1.0-alpha.27](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.26...v2.1.0-alpha.27) (2024-05-29)
|
|
3
15
|
|
|
4
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/ethereum",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.28",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"@walletconnect/ethereum-provider": "2.11.2",
|
|
32
32
|
"eventemitter3": "5.0.1",
|
|
33
33
|
"buffer": "6.0.3",
|
|
34
|
-
"@dynamic-labs/rpc-provider-ethereum": "2.1.0-alpha.
|
|
35
|
-
"@dynamic-labs/turnkey": "2.1.0-alpha.
|
|
36
|
-
"@dynamic-labs/types": "2.1.0-alpha.
|
|
37
|
-
"@dynamic-labs/utils": "2.1.0-alpha.
|
|
38
|
-
"@dynamic-labs/viem-utils": "2.1.0-alpha.
|
|
39
|
-
"@dynamic-labs/wallet-book": "2.1.0-alpha.
|
|
40
|
-
"@dynamic-labs/wallet-connector-core": "2.1.0-alpha.
|
|
34
|
+
"@dynamic-labs/rpc-provider-ethereum": "2.1.0-alpha.28",
|
|
35
|
+
"@dynamic-labs/turnkey": "2.1.0-alpha.28",
|
|
36
|
+
"@dynamic-labs/types": "2.1.0-alpha.28",
|
|
37
|
+
"@dynamic-labs/utils": "2.1.0-alpha.28",
|
|
38
|
+
"@dynamic-labs/viem-utils": "2.1.0-alpha.28",
|
|
39
|
+
"@dynamic-labs/wallet-book": "2.1.0-alpha.28",
|
|
40
|
+
"@dynamic-labs/wallet-connector-core": "2.1.0-alpha.28",
|
|
41
41
|
"stream": "0.0.2"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
package/src/coinbase/helpers.cjs
CHANGED
|
@@ -8,14 +8,20 @@ var walletSdk = require('@coinbase/wallet-sdk');
|
|
|
8
8
|
// storing a reference to the coinbase provider because the provider methods work better when
|
|
9
9
|
// they are called on the same instance
|
|
10
10
|
let coinbaseProvider;
|
|
11
|
-
const getCoinbaseProvider = ({ opts: { appLogoUrl, appName, walletPreference } = {}, }) => {
|
|
11
|
+
const getCoinbaseProvider = ({ opts: { appLogoUrl, appName, evmNetworks, walletPreference } = {}, }) => {
|
|
12
|
+
// favoring base sepolia since that is the only chain that works for now
|
|
13
|
+
// when coinbase launches in mainnet, customers can simply disable the base sepolia chain
|
|
14
|
+
// from their dynamic settings, and everything will still work
|
|
15
|
+
const hasBaseSepolia = evmNetworks === null || evmNetworks === void 0 ? void 0 : evmNetworks.some((network) => network.chainId === 84532);
|
|
16
|
+
const appChainIds = evmNetworks === null || evmNetworks === void 0 ? void 0 : evmNetworks.map((network) => Number(network.chainId));
|
|
17
|
+
if (hasBaseSepolia) {
|
|
18
|
+
// just brings base sepolia to the front, because that is the chain that the coinbase
|
|
19
|
+
// provider returns when calling getNetwork
|
|
20
|
+
appChainIds === null || appChainIds === void 0 ? void 0 : appChainIds.sort((a, b) => (a === 84532 ? -1 : b === 84532 ? 1 : 0));
|
|
21
|
+
}
|
|
12
22
|
if (!coinbaseProvider) {
|
|
13
23
|
const coinbaseSdk = new walletSdk.CoinbaseWalletSDK({
|
|
14
|
-
appChainIds
|
|
15
|
-
// hard code to work on base sepolia for now
|
|
16
|
-
84532,
|
|
17
|
-
// ...evmNetworks?.map((network) => Number(network.chainId)),
|
|
18
|
-
],
|
|
24
|
+
appChainIds,
|
|
19
25
|
appLogoUrl,
|
|
20
26
|
appName,
|
|
21
27
|
});
|
package/src/coinbase/helpers.js
CHANGED
|
@@ -4,14 +4,20 @@ import { CoinbaseWalletSDK } from '@coinbase/wallet-sdk';
|
|
|
4
4
|
// storing a reference to the coinbase provider because the provider methods work better when
|
|
5
5
|
// they are called on the same instance
|
|
6
6
|
let coinbaseProvider;
|
|
7
|
-
const getCoinbaseProvider = ({ opts: { appLogoUrl, appName, walletPreference } = {}, }) => {
|
|
7
|
+
const getCoinbaseProvider = ({ opts: { appLogoUrl, appName, evmNetworks, walletPreference } = {}, }) => {
|
|
8
|
+
// favoring base sepolia since that is the only chain that works for now
|
|
9
|
+
// when coinbase launches in mainnet, customers can simply disable the base sepolia chain
|
|
10
|
+
// from their dynamic settings, and everything will still work
|
|
11
|
+
const hasBaseSepolia = evmNetworks === null || evmNetworks === void 0 ? void 0 : evmNetworks.some((network) => network.chainId === 84532);
|
|
12
|
+
const appChainIds = evmNetworks === null || evmNetworks === void 0 ? void 0 : evmNetworks.map((network) => Number(network.chainId));
|
|
13
|
+
if (hasBaseSepolia) {
|
|
14
|
+
// just brings base sepolia to the front, because that is the chain that the coinbase
|
|
15
|
+
// provider returns when calling getNetwork
|
|
16
|
+
appChainIds === null || appChainIds === void 0 ? void 0 : appChainIds.sort((a, b) => (a === 84532 ? -1 : b === 84532 ? 1 : 0));
|
|
17
|
+
}
|
|
8
18
|
if (!coinbaseProvider) {
|
|
9
19
|
const coinbaseSdk = new CoinbaseWalletSDK({
|
|
10
|
-
appChainIds
|
|
11
|
-
// hard code to work on base sepolia for now
|
|
12
|
-
84532,
|
|
13
|
-
// ...evmNetworks?.map((network) => Number(network.chainId)),
|
|
14
|
-
],
|
|
20
|
+
appChainIds,
|
|
15
21
|
appLogoUrl,
|
|
16
22
|
appName,
|
|
17
23
|
});
|