Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Emil Lai <[email protected]>
  • Loading branch information
magnusbechwind and MilkywayPirate authored Nov 29, 2023
1 parent 1976498 commit a4ec4fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions concordium-sdk/src/main/java/com/concordium/sdk/ClientV2.java
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ public ImmutableList<WinningBaker> getWinningBakersEpoch(EpochQuery epochQuery)
public FinalizedBlockItem waitUntilFinalized(Hash transactionHash, int timeoutMillis) {
try {
BlockItemStatus status = this.getBlockItemStatus(transactionHash);
if (status.getStatus() == Status.FINALIZED) {
if (status.getFinalizedBlockItem().isPresent()) {
return status.getFinalizedBlockItem().get();
}
} catch (io.grpc.StatusRuntimeException e) {
Expand Down Expand Up @@ -932,7 +932,7 @@ private FinalizedBlockItem listenForFinalizedTransaction(Hash transactionHash, i
// We check if the transaction is finalized every time a new block is finalized.
try {
BlockItemStatus newStatus = this.getBlockItemStatus(transactionHash);
if (newStatus.getStatus() == Status.FINALIZED) {
if (newStatus.getFinalizedBlockItem().isPresent()) {
return newStatus.getFinalizedBlockItem().get();
}
} catch (io.grpc.StatusRuntimeException e) {
Expand Down

0 comments on commit a4ec4fd

Please sign in to comment.