Skip to content

Commit

Permalink
Merge pull request #1094 from HenrikJannsen/bugfixes_with_network_dat…
Browse files Browse the repository at this point in the history
…a_validation

Bugfixes with network data validation
  • Loading branch information
alvasw authored Aug 7, 2023
2 parents 3999587 + 20553de commit 306f567
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contract/src/main/java/bisq/contract/ContractService.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public CompletableFuture<Boolean> shutdown() {
}

private <T extends Offer<?, ?>> byte[] getContractHash(Contract<T> contract) {
return DigestUtil.sha256(contract.getHashForSignature());
return DigestUtil.hash(contract.getHashForSignature());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected TradeMessage(String tradeId, NetworkId sender) {
this.tradeId = tradeId;
this.sender = sender;

NetworkDataValidation.validateId(tradeId);
NetworkDataValidation.validateText(tradeId, 200); // For private channels we combine user profile IDs for channelId
}

public bisq.trade.protobuf.TradeMessage.Builder getTradeMessageBuilder() {
Expand Down

0 comments on commit 306f567

Please sign in to comment.