@dynamic-labs/solana-core 3.0.2 → 4.0.0-alpha.0

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,18 +1,11 @@
1
1
 
2
- ### [3.0.2](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.1...v3.0.2) (2024-09-13)
2
+ ## [4.0.0-alpha.0](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0...v4.0.0-alpha.0) (2024-09-13)
3
3
 
4
4
 
5
5
  ### Bug Fixes
6
6
 
7
- * solana and cosmos signers not working properly ([#6897](https://github.com/dynamic-labs/DynamicAuth/issues/6897)) ([6e27c08](https://github.com/dynamic-labs/DynamicAuth/commit/6e27c0817f8f0a454eaa14ff56a430072f9730e3))
8
-
9
- ### [3.0.1](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0...v3.0.1) (2024-09-13)
10
-
11
-
12
- ### Bug Fixes
13
-
14
- * create v2 embedded wallet experience in manual mode ([#6887](https://github.com/dynamic-labs/DynamicAuth/issues/6887)) ([#6891](https://github.com/dynamic-labs/DynamicAuth/issues/6891)) ([64d027b](https://github.com/dynamic-labs/DynamicAuth/commit/64d027b4b5d877845551eae23c666d7863f7109d))
15
- * solana pk export format ([#6888](https://github.com/dynamic-labs/DynamicAuth/issues/6888)) ([#6890](https://github.com/dynamic-labs/DynamicAuth/issues/6890)) ([cb68997](https://github.com/dynamic-labs/DynamicAuth/commit/cb68997970ccf53734b7d296153185b4866c7f94))
7
+ * create v2 embedded wallet experience in manual mode ([#6887](https://github.com/dynamic-labs/DynamicAuth/issues/6887)) ([8b0953a](https://github.com/dynamic-labs/DynamicAuth/commit/8b0953ac6d511ca254e01da689beb46faa68cf02))
8
+ * solana pk export format ([#6888](https://github.com/dynamic-labs/DynamicAuth/issues/6888)) ([31a5fe2](https://github.com/dynamic-labs/DynamicAuth/commit/31a5fe272cbfabf8e5d90bc8f18dcf0fff504fd1))
16
9
 
17
10
  ## [3.0.0](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.68...v3.0.0) (2024-09-13)
18
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/solana-core",
3
- "version": "3.0.2",
3
+ "version": "4.0.0-alpha.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
@@ -31,11 +31,11 @@
31
31
  "@solana/spl-token": "0.4.6"
32
32
  },
33
33
  "peerDependencies": {
34
- "@dynamic-labs/rpc-providers": "3.0.2",
35
- "@dynamic-labs/types": "3.0.2",
36
- "@dynamic-labs/utils": "3.0.2",
37
- "@dynamic-labs/wallet-book": "3.0.2",
38
- "@dynamic-labs/wallet-connector-core": "3.0.2",
34
+ "@dynamic-labs/rpc-providers": "4.0.0-alpha.0",
35
+ "@dynamic-labs/types": "4.0.0-alpha.0",
36
+ "@dynamic-labs/utils": "4.0.0-alpha.0",
37
+ "@dynamic-labs/wallet-book": "4.0.0-alpha.0",
38
+ "@dynamic-labs/wallet-connector-core": "4.0.0-alpha.0",
39
39
  "eventemitter3": "5.0.1"
40
40
  }
41
41
  }
@@ -28,30 +28,24 @@ class SolanaWallet extends walletConnectorCore.Wallet {
28
28
  if (!signer) {
29
29
  throw new Error('unable to retrieve Solana signer');
30
30
  }
31
- try {
32
- return utils.cloneObjectWithOverrides(signer, {
33
- signAllTransactions: (transactions) => _tslib.__awaiter(this, void 0, void 0, function* () {
34
- yield this.sync();
35
- return signer.signAllTransactions(transactions);
36
- }),
37
- signAndSendTransaction: (transaction, ...args) => _tslib.__awaiter(this, void 0, void 0, function* () {
38
- yield this.sync();
39
- return signer.signAndSendTransaction(transaction, ...args);
40
- }),
41
- signMessage: (message, ...args) => _tslib.__awaiter(this, void 0, void 0, function* () {
42
- yield this.sync();
43
- return signer.signMessage(message, ...args);
44
- }),
45
- signTransaction: (transaction) => _tslib.__awaiter(this, void 0, void 0, function* () {
46
- yield this.sync();
47
- return signer.signTransaction(transaction);
48
- }),
49
- });
50
- }
51
- catch (error) {
52
- walletConnectorCore.logger.warn(`Failed to add logic to auto-sync the wallet. Signer might be out of sync for wallet: ${this._connector.name} (${this.address})`, error);
53
- return signer;
54
- }
31
+ return utils.cloneObjectWithOverrides(signer, {
32
+ signAllTransactions: (transactions) => _tslib.__awaiter(this, void 0, void 0, function* () {
33
+ yield this.sync();
34
+ return signer.signAllTransactions(transactions);
35
+ }),
36
+ signAndSendTransaction: (transaction, ...args) => _tslib.__awaiter(this, void 0, void 0, function* () {
37
+ yield this.sync();
38
+ return signer.signAndSendTransaction(transaction, ...args);
39
+ }),
40
+ signMessage: (message, ...args) => _tslib.__awaiter(this, void 0, void 0, function* () {
41
+ yield this.sync();
42
+ return signer.signMessage(message, ...args);
43
+ }),
44
+ signTransaction: (transaction) => _tslib.__awaiter(this, void 0, void 0, function* () {
45
+ yield this.sync();
46
+ return signer.signTransaction(transaction);
47
+ }),
48
+ });
55
49
  });
56
50
  }
57
51
  }
@@ -1,6 +1,6 @@
1
1
  'use client'
2
2
  import { __awaiter } from '../../_virtual/_tslib.js';
3
- import { Wallet, logger } from '@dynamic-labs/wallet-connector-core';
3
+ import { Wallet } from '@dynamic-labs/wallet-connector-core';
4
4
  import { cloneObjectWithOverrides } from '@dynamic-labs/utils';
5
5
 
6
6
  class SolanaWallet extends Wallet {
@@ -24,30 +24,24 @@ class SolanaWallet extends Wallet {
24
24
  if (!signer) {
25
25
  throw new Error('unable to retrieve Solana signer');
26
26
  }
27
- try {
28
- return cloneObjectWithOverrides(signer, {
29
- signAllTransactions: (transactions) => __awaiter(this, void 0, void 0, function* () {
30
- yield this.sync();
31
- return signer.signAllTransactions(transactions);
32
- }),
33
- signAndSendTransaction: (transaction, ...args) => __awaiter(this, void 0, void 0, function* () {
34
- yield this.sync();
35
- return signer.signAndSendTransaction(transaction, ...args);
36
- }),
37
- signMessage: (message, ...args) => __awaiter(this, void 0, void 0, function* () {
38
- yield this.sync();
39
- return signer.signMessage(message, ...args);
40
- }),
41
- signTransaction: (transaction) => __awaiter(this, void 0, void 0, function* () {
42
- yield this.sync();
43
- return signer.signTransaction(transaction);
44
- }),
45
- });
46
- }
47
- catch (error) {
48
- logger.warn(`Failed to add logic to auto-sync the wallet. Signer might be out of sync for wallet: ${this._connector.name} (${this.address})`, error);
49
- return signer;
50
- }
27
+ return cloneObjectWithOverrides(signer, {
28
+ signAllTransactions: (transactions) => __awaiter(this, void 0, void 0, function* () {
29
+ yield this.sync();
30
+ return signer.signAllTransactions(transactions);
31
+ }),
32
+ signAndSendTransaction: (transaction, ...args) => __awaiter(this, void 0, void 0, function* () {
33
+ yield this.sync();
34
+ return signer.signAndSendTransaction(transaction, ...args);
35
+ }),
36
+ signMessage: (message, ...args) => __awaiter(this, void 0, void 0, function* () {
37
+ yield this.sync();
38
+ return signer.signMessage(message, ...args);
39
+ }),
40
+ signTransaction: (transaction) => __awaiter(this, void 0, void 0, function* () {
41
+ yield this.sync();
42
+ return signer.signTransaction(transaction);
43
+ }),
44
+ });
51
45
  });
52
46
  }
53
47
  }