@dynamic-labs/solana-core 3.2.0 → 3.3.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,4 +1,16 @@
1
1
 
2
+ ## [3.3.0](https://github.com/dynamic-labs/DynamicAuth/compare/v3.2.0...v3.3.0) (2024-10-08)
3
+
4
+
5
+ ### Features
6
+
7
+ * Account Abstraction Multi-Chain ([#7088](https://github.com/dynamic-labs/DynamicAuth/issues/7088)) ([c5de504](https://github.com/dynamic-labs/DynamicAuth/commit/c5de50414299473b8ec18094693377d8c064e4fa))
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * solana embedded sponsored transactions ([#7066](https://github.com/dynamic-labs/DynamicAuth/issues/7066)) ([086b4ec](https://github.com/dynamic-labs/DynamicAuth/commit/086b4ecbbad56a4684f655fb977a1d5d7d3bca3a))
13
+
2
14
  ## [3.2.0](https://github.com/dynamic-labs/DynamicAuth/compare/v3.1.4...v3.2.0) (2024-10-02)
3
15
 
4
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/solana-core",
3
- "version": "3.2.0",
3
+ "version": "3.3.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.2.0",
35
- "@dynamic-labs/types": "3.2.0",
36
- "@dynamic-labs/utils": "3.2.0",
37
- "@dynamic-labs/wallet-book": "3.2.0",
38
- "@dynamic-labs/wallet-connector-core": "3.2.0",
34
+ "@dynamic-labs/rpc-providers": "3.3.0",
35
+ "@dynamic-labs/types": "3.3.0",
36
+ "@dynamic-labs/utils": "3.3.0",
37
+ "@dynamic-labs/wallet-book": "3.3.0",
38
+ "@dynamic-labs/wallet-connector-core": "3.3.0",
39
39
  "eventemitter3": "5.0.1"
40
40
  }
41
41
  }
@@ -66,14 +66,10 @@ class SolanaUiTransaction {
66
66
  return;
67
67
  }
68
68
  let compiledMessage;
69
- const { blockhash } = yield this.connection.getLatestBlockhash();
70
69
  if ('version' in transaction) {
71
- transaction.message.recentBlockhash = blockhash;
72
70
  compiledMessage = transaction.message;
73
71
  }
74
72
  else {
75
- transaction.recentBlockhash = blockhash;
76
- transaction.feePayer = new web3_js.PublicKey(this.from);
77
73
  compiledMessage = transaction.compileMessage();
78
74
  }
79
75
  if (!compiledMessage) {
@@ -134,6 +130,10 @@ class SolanaUiTransaction {
134
130
  toPubkey,
135
131
  }));
136
132
  }
133
+ // only set blockhash when we are creating the transaction, e.g send balance flow
134
+ const { blockhash } = yield this.connection.getLatestBlockhash();
135
+ sendTransaction.feePayer = new web3_js.PublicKey(this.from);
136
+ sendTransaction.recentBlockhash = blockhash;
137
137
  return sendTransaction;
138
138
  });
139
139
  }
@@ -62,14 +62,10 @@ class SolanaUiTransaction {
62
62
  return;
63
63
  }
64
64
  let compiledMessage;
65
- const { blockhash } = yield this.connection.getLatestBlockhash();
66
65
  if ('version' in transaction) {
67
- transaction.message.recentBlockhash = blockhash;
68
66
  compiledMessage = transaction.message;
69
67
  }
70
68
  else {
71
- transaction.recentBlockhash = blockhash;
72
- transaction.feePayer = new PublicKey(this.from);
73
69
  compiledMessage = transaction.compileMessage();
74
70
  }
75
71
  if (!compiledMessage) {
@@ -130,6 +126,10 @@ class SolanaUiTransaction {
130
126
  toPubkey,
131
127
  }));
132
128
  }
129
+ // only set blockhash when we are creating the transaction, e.g send balance flow
130
+ const { blockhash } = yield this.connection.getLatestBlockhash();
131
+ sendTransaction.feePayer = new PublicKey(this.from);
132
+ sendTransaction.recentBlockhash = blockhash;
133
133
  return sendTransaction;
134
134
  });
135
135
  }