@huma-finance/widgets 0.0.62-beta.713 → 0.0.62-beta.714
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 +9 -20
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.js +9 -20
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/components/SolanaTxSendModal.tsx +8 -21
package/dist/cjs/index.cjs
CHANGED
|
@@ -8726,7 +8726,6 @@ function SolanaViewOnExplorer(_ref) {
|
|
|
8726
8726
|
});
|
|
8727
8727
|
}
|
|
8728
8728
|
|
|
8729
|
-
/* eslint-disable no-await-in-loop */
|
|
8730
8729
|
function SolanaTxSendModal(_ref) {
|
|
8731
8730
|
let {
|
|
8732
8731
|
chainId,
|
|
@@ -8747,28 +8746,18 @@ function SolanaTxSendModal(_ref) {
|
|
|
8747
8746
|
return;
|
|
8748
8747
|
}
|
|
8749
8748
|
try {
|
|
8749
|
+
const latestBlockHash = await connection.getLatestBlockhash();
|
|
8750
8750
|
const signature = await sendTransaction(tx, connection);
|
|
8751
8751
|
setSignature(signature);
|
|
8752
8752
|
dispatch(setSolanaSignature(signature));
|
|
8753
|
-
|
|
8754
|
-
|
|
8755
|
-
|
|
8756
|
-
|
|
8757
|
-
|
|
8758
|
-
|
|
8759
|
-
|
|
8760
|
-
|
|
8761
|
-
}
|
|
8762
|
-
}
|
|
8763
|
-
if (transactionConfirmed) {
|
|
8764
|
-
handleSuccess({
|
|
8765
|
-
signature
|
|
8766
|
-
});
|
|
8767
|
-
} else {
|
|
8768
|
-
dispatch(setError({
|
|
8769
|
-
errorMessage: 'Transaction failed to confirm in time'
|
|
8770
|
-
}));
|
|
8771
|
-
}
|
|
8753
|
+
await connection.confirmTransaction({
|
|
8754
|
+
blockhash: latestBlockHash.blockhash,
|
|
8755
|
+
lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,
|
|
8756
|
+
signature
|
|
8757
|
+
});
|
|
8758
|
+
handleSuccess({
|
|
8759
|
+
signature
|
|
8760
|
+
});
|
|
8772
8761
|
} catch (error) {
|
|
8773
8762
|
const err = error;
|
|
8774
8763
|
dispatch(setError({
|