Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed missing await for refreshAccount in useCheckTransactionStatus #960

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- [Fixed missing `await` for `refreshAccount` in `useCheckTransactionStatus`](https://github.com/multiversx/mx-sdk-dapp/pull/960)
- [Fixed `MultiESDTNFTTransfer` data field highlight and signing](https://github.com/multiversx/mx-sdk-dapp/pull/958)

## [[v2.22.5]](https://github.com/multiversx/mx-sdk-dapp/pull/956)] - 2023-10-13
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@ export function useCheckTransactionStatus() {
}
) {
const pendingBatches = pendingTransactionsArray
.filter(([, session]) => !session?.customTransactionInformation?.grouping)
.filter(
([_, session]) => !session?.customTransactionInformation?.grouping
)
.filter(([sessionId, session]) => {
const isPending =
sessionId != null && getIsTransactionPending(session.status);
return isPending;
});
([sessionId, session]) =>
sessionId != null && getIsTransactionPending(session.status)
);

if (pendingBatches.length > 0) {
for (const [sessionId, transactionBatch] of pendingBatches) {
Expand All @@ -31,8 +28,9 @@ export function useCheckTransactionStatus() {
});
}
}

if (props.shouldRefreshBalance) {
refreshAccount();
await refreshAccount();
}
}

Expand Down