@huma-finance/widgets 0.0.62-beta.729 → 0.0.62-beta.731
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/dist/cjs/index.cjs +10 -4
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/components/SolanaTxSendModal.tsx +18 -5
package/dist/cjs/index.cjs
CHANGED
|
@@ -8843,13 +8843,19 @@ function SolanaTxSendModal(_ref) {
|
|
|
8843
8843
|
return;
|
|
8844
8844
|
}
|
|
8845
8845
|
try {
|
|
8846
|
-
|
|
8847
|
-
const
|
|
8846
|
+
// Optimize transaction
|
|
8847
|
+
const lockedWritableAccounts = sdk.extractWritableAccounts(tx);
|
|
8848
|
+
const optimizedTx = await sdk.buildOptimalTransactionFromConnection(tx, lockedWritableAccounts, connection);
|
|
8849
|
+
const signature = await sendTransaction(optimizedTx, connection, {
|
|
8850
|
+
maxRetries: 5,
|
|
8851
|
+
preflightCommitment: 'confirmed',
|
|
8852
|
+
skipPreflight: true
|
|
8853
|
+
});
|
|
8848
8854
|
setSignature(signature);
|
|
8849
8855
|
dispatch(setSolanaSignature(signature));
|
|
8850
8856
|
await connection.confirmTransaction({
|
|
8851
|
-
blockhash:
|
|
8852
|
-
lastValidBlockHeight:
|
|
8857
|
+
blockhash: optimizedTx.recentBlockhash,
|
|
8858
|
+
lastValidBlockHeight: optimizedTx.lastValidBlockHeight,
|
|
8853
8859
|
signature
|
|
8854
8860
|
});
|
|
8855
8861
|
handleSuccess({
|