Skip to content

Commit

Permalink
Merge pull request #1297 from cardano-foundation/fix/genesiss-block-i…
Browse files Browse the repository at this point in the history
…ssues

Fix/genesiss block issues
  • Loading branch information
Sotatek-DucPhung committed Jul 16, 2024
2 parents 6e613b2 + 092f70b commit fab0961
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,10 @@ private void setAssociatedScript(AddressResponse addressResponse) {
private boolean checkNetworkAddress(String address) {
if (address.startsWith(CommonConstant.TESTNET_ADDRESS_PREFIX)) {
return !network.equals(CommonConstant.MAINNET_NETWORK);
} else {
} else if (address.startsWith(CommonConstant.ADDRESS_PREFIX)) {
return network.equals(CommonConstant.MAINNET_NETWORK);
} else { // Genesis address
return true;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,9 @@ private List<TxFilterResponse> mapTxDataFromAddressTxAmount(
txFilterResponse.setTime(block.getTime().toLocalDateTime());
txFilterResponse.setBlockNo(block.getBlockNo());
txFilterResponse.setEpochNo(block.getEpochNo());
txFilterResponse.setSlot(block.getSlotNo().intValue());
if (block.getSlotNo() != null) {
txFilterResponse.setSlot(block.getSlotNo().intValue());
}
txFilterResponse.setEpochSlotNo(block.getEpochSlotNo());
txFilterResponse.setFee(tx.getFee());
txFilterResponse.setBalance(balance);
Expand Down

0 comments on commit fab0961

Please sign in to comment.