@huma-finance/widgets 0.0.62-beta.729 → 0.0.62-beta.730

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.
@@ -8843,13 +8843,17 @@ function SolanaTxSendModal(_ref) {
8843
8843
  return;
8844
8844
  }
8845
8845
  try {
8846
- const latestBlockHash = await connection.getLatestBlockhash();
8847
- const signature = await sendTransaction(tx, connection);
8846
+ const lockedWritableAccounts = sdk.extractWritableAccounts(tx);
8847
+ const optimizedTx = await sdk.buildOptimalTransactionFromConnection(tx, lockedWritableAccounts, connection);
8848
+ const signature = await sendTransaction(optimizedTx, connection, {
8849
+ maxRetries: 5,
8850
+ preflightCommitment: 'confirmed'
8851
+ });
8848
8852
  setSignature(signature);
8849
8853
  dispatch(setSolanaSignature(signature));
8850
8854
  await connection.confirmTransaction({
8851
- blockhash: latestBlockHash.blockhash,
8852
- lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,
8855
+ blockhash: optimizedTx.recentBlockhash,
8856
+ lastValidBlockHeight: optimizedTx.lastValidBlockHeight,
8853
8857
  signature
8854
8858
  });
8855
8859
  handleSuccess({