@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/index.js
CHANGED
|
@@ -8709,7 +8709,6 @@ function SolanaViewOnExplorer(_ref) {
|
|
|
8709
8709
|
});
|
|
8710
8710
|
}
|
|
8711
8711
|
|
|
8712
|
-
/* eslint-disable no-await-in-loop */
|
|
8713
8712
|
function SolanaTxSendModal(_ref) {
|
|
8714
8713
|
let {
|
|
8715
8714
|
chainId,
|
|
@@ -8730,28 +8729,18 @@ function SolanaTxSendModal(_ref) {
|
|
|
8730
8729
|
return;
|
|
8731
8730
|
}
|
|
8732
8731
|
try {
|
|
8732
|
+
const latestBlockHash = await connection.getLatestBlockhash();
|
|
8733
8733
|
const signature = await sendTransaction(tx, connection);
|
|
8734
8734
|
setSignature(signature);
|
|
8735
8735
|
dispatch(setSolanaSignature(signature));
|
|
8736
|
-
|
|
8737
|
-
|
|
8738
|
-
|
|
8739
|
-
|
|
8740
|
-
|
|
8741
|
-
|
|
8742
|
-
|
|
8743
|
-
|
|
8744
|
-
}
|
|
8745
|
-
}
|
|
8746
|
-
if (transactionConfirmed) {
|
|
8747
|
-
handleSuccess({
|
|
8748
|
-
signature
|
|
8749
|
-
});
|
|
8750
|
-
} else {
|
|
8751
|
-
dispatch(setError({
|
|
8752
|
-
errorMessage: 'Transaction failed to confirm in time'
|
|
8753
|
-
}));
|
|
8754
|
-
}
|
|
8736
|
+
await connection.confirmTransaction({
|
|
8737
|
+
blockhash: latestBlockHash.blockhash,
|
|
8738
|
+
lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,
|
|
8739
|
+
signature
|
|
8740
|
+
});
|
|
8741
|
+
handleSuccess({
|
|
8742
|
+
signature
|
|
8743
|
+
});
|
|
8755
8744
|
} catch (error) {
|
|
8756
8745
|
const err = error;
|
|
8757
8746
|
dispatch(setError({
|