@dynamic-labs/wallet-connector-core 3.0.0-alpha.41 → 3.0.0-alpha.43

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 CHANGED
@@ -1,4 +1,34 @@
1
1
 
2
+ ## [3.0.0-alpha.43](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.42...v3.0.0-alpha.43) (2024-08-15)
3
+
4
+
5
+ ### ⚠ BREAKING CHANGES
6
+
7
+ * removes walletConnector from dynamic context (#6579)
8
+ * removed deprecated props from user profile (#6589)
9
+
10
+ ### Features
11
+
12
+ * optimize solana embedded transactions ([#6582](https://github.com/dynamic-labs/DynamicAuth/issues/6582)) ([419aff9](https://github.com/dynamic-labs/DynamicAuth/commit/419aff96d312892d7db520e94ecc6956b8de771d))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * check if wallet is connected using normalized addresses ([#6594](https://github.com/dynamic-labs/DynamicAuth/issues/6594)) ([44aabae](https://github.com/dynamic-labs/DynamicAuth/commit/44aabae8ee72261bf0f7e308ed4adf0f42760ed2))
18
+ * minor sdk ui updates ([#6590](https://github.com/dynamic-labs/DynamicAuth/issues/6590)) ([8619e40](https://github.com/dynamic-labs/DynamicAuth/commit/8619e40e1afff8d68357138f3b5b9b89989140fd))
19
+
20
+
21
+ * removed deprecated props from user profile ([#6589](https://github.com/dynamic-labs/DynamicAuth/issues/6589)) ([b621da8](https://github.com/dynamic-labs/DynamicAuth/commit/b621da8a0703eb8228a5b10131af2717f314fd2e))
22
+ * removes walletConnector from dynamic context ([#6579](https://github.com/dynamic-labs/DynamicAuth/issues/6579)) ([51d69fe](https://github.com/dynamic-labs/DynamicAuth/commit/51d69feebab71158ad2aa69f11001623a0aaa80a))
23
+
24
+ ## [3.0.0-alpha.42](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.41...v3.0.0-alpha.42) (2024-08-14)
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * isEmbeddedWallet condition in AuthProviderIcon ([#6581](https://github.com/dynamic-labs/DynamicAuth/issues/6581)) ([afe33ab](https://github.com/dynamic-labs/DynamicAuth/commit/afe33aba1cc8abefd0566bf4e9c0a4f199d64ef7))
30
+ * update text on MFA backup codes acknowledgement ([#6559](https://github.com/dynamic-labs/DynamicAuth/issues/6559)) ([98b5475](https://github.com/dynamic-labs/DynamicAuth/commit/98b5475df73039061d593318cb26140075de69e1))
31
+
2
32
  ## [3.0.0-alpha.41](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.40...v3.0.0-alpha.41) (2024-08-13)
3
33
 
4
34
  ## [3.0.0-alpha.40](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.39...v3.0.0-alpha.40) (2024-08-13)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/wallet-connector-core",
3
- "version": "3.0.0-alpha.41",
3
+ "version": "3.0.0-alpha.43",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
@@ -26,14 +26,14 @@
26
26
  "./package.json": "./package.json"
27
27
  },
28
28
  "dependencies": {
29
- "@dynamic-labs/sdk-api-core": "0.0.510"
29
+ "@dynamic-labs/sdk-api-core": "0.0.516"
30
30
  },
31
31
  "peerDependencies": {
32
- "@dynamic-labs/logger": "3.0.0-alpha.41",
33
- "@dynamic-labs/rpc-providers": "3.0.0-alpha.41",
34
- "@dynamic-labs/types": "3.0.0-alpha.41",
35
- "@dynamic-labs/utils": "3.0.0-alpha.41",
36
- "@dynamic-labs/wallet-book": "3.0.0-alpha.41",
32
+ "@dynamic-labs/logger": "3.0.0-alpha.43",
33
+ "@dynamic-labs/rpc-providers": "3.0.0-alpha.43",
34
+ "@dynamic-labs/types": "3.0.0-alpha.43",
35
+ "@dynamic-labs/utils": "3.0.0-alpha.43",
36
+ "@dynamic-labs/wallet-book": "3.0.0-alpha.43",
37
37
  "eventemitter3": "5.0.1"
38
38
  }
39
39
  }
package/src/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from './lib';
2
- export * from './types';
3
- export * from './utils';
1
+ export { Chains, Wallet, WalletConnectorBase, socialProviders, type Attestation, type AuthenticatorRecoveryHandler, type AuthenticatorType, type BitcoinSignPsbtRequest, type BitcoinSignPsbtRequestSignature, type BitcoinSignPsbtResponse, type Chain, type ChainInfo, type ExportHandler, type ExtendedPrivateKey, type GetAddressOpts, type IAccountAbstractionWalletConnector, type IBitcoinWalletConnector, type ICoinbaseMPCWalletConnector, type IEmailOTPWalletConnector, type IEmailWalletConnector, type IHardwareWalletConnector, type IPasskeyWalletConnector, type IPhantomRedirectConnector, type IPhantomRedirectConnectorWithEvents, type ISMSWalletConnector, type ISendBalanceWalletConnector, type ISessionKeyCompatibleWalletConnector, type ITurnkeyWalletConnectorStamper, type IWalletConnectConnector, type NameServiceData, type PayloadParams, type RawPrivateKey, type RecoveryEmailParams, type RecoveryWebAuthnAttestation, type SignAllTransactionsListener, type SignAndSendTransactionListener, type SignMessageListener, type SignTransactionListener, type SmartWalletConnector, type SocialProvider, type WalletConnector, type WalletConnectorConstructor, type WalletConnectorCore, type WalletConnectorEventTypes, type WalletConnectorsMethod, type WebAuthnAttestation, } from './lib';
4
2
  export type { WalletConnectorExtension } from './lib/WalletConnectorExtension';
3
+ export type { AccountChangeEventHandler, ChainChangeEventHandler, DisconnectEventHandler, } from './types';
4
+ export { ProviderLookup, addHexPrefix, bufferToHex, eventListenerHandlers, getChainInfo, getDeepLink, getMobileExperience, getRpcUrlForChain, getWalletConnectorByKey, isAccountAbstractionConnector, isBitcoinConnector, isBloctoConnector, isCoinbaseMpcWalletConnector, isEmailOTPWalletConnector, isEmailWalletConnector, isEmbeddedConnector, isHardwareWalletConnector, isHex, isMagicConnector, isPasskeyWalletConnector, isPhantomRedirectConnector, isSameAddress, isSendBalanceWalletConnector, isSessionKeyCompatibleWalletConnector, isSmartWalletConnector, isSocialWalletConnector, isWalletConnectConnector, logger, performPlatformSpecificConnectionMethod, shouldLowercaseAddress, utf8ToHex, type DeepLinkVariant, type ProviderCondition, } from './utils';
@@ -6,6 +6,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
6
6
  var _tslib = require('../../../../_virtual/_tslib.cjs');
7
7
  var types = require('@dynamic-labs/types');
8
8
  var logger = require('../../../utils/logger.cjs');
9
+ var normalizeAddress = require('../../../utils/isSameAddress/utils/normalizeAddress/normalizeAddress.cjs');
9
10
  require('@dynamic-labs/utils');
10
11
  require('@dynamic-labs/wallet-book');
11
12
 
@@ -101,7 +102,9 @@ class Wallet extends types.BaseWallet {
101
102
  return _tslib.__awaiter(this, void 0, void 0, function* () {
102
103
  try {
103
104
  const connectedAccounts = yield _tslib.__classPrivateFieldGet(this, _Wallet_connector, "f").getConnectedAccounts();
104
- return connectedAccounts.includes(this.address);
105
+ return connectedAccounts
106
+ .map((address) => normalizeAddress.normalizeAddress(address, this.chain))
107
+ .includes(normalizeAddress.normalizeAddress(this.address, this.chain));
105
108
  }
106
109
  catch (error) {
107
110
  logger.logger.error('[Wallet] isConnected - Error detecting if wallet is connected', error);
@@ -2,6 +2,7 @@
2
2
  import { __rest, __classPrivateFieldSet, __classPrivateFieldGet, __awaiter } from '../../../../_virtual/_tslib.js';
3
3
  import { BaseWallet } from '@dynamic-labs/types';
4
4
  import { logger } from '../../../utils/logger.js';
5
+ import { normalizeAddress } from '../../../utils/isSameAddress/utils/normalizeAddress/normalizeAddress.js';
5
6
  import '@dynamic-labs/utils';
6
7
  import '@dynamic-labs/wallet-book';
7
8
 
@@ -97,7 +98,9 @@ class Wallet extends BaseWallet {
97
98
  return __awaiter(this, void 0, void 0, function* () {
98
99
  try {
99
100
  const connectedAccounts = yield __classPrivateFieldGet(this, _Wallet_connector, "f").getConnectedAccounts();
100
- return connectedAccounts.includes(this.address);
101
+ return connectedAccounts
102
+ .map((address) => normalizeAddress(address, this.chain))
103
+ .includes(normalizeAddress(this.address, this.chain));
101
104
  }
102
105
  catch (error) {
103
106
  logger.error('[Wallet] isConnected - Error detecting if wallet is connected', error);