We had not updated the contract hash after setting the signature.

We verify later the contract hash in disputes and that would fail otherwise.
This commit is contained in:
HenrikJannsen 2022-11-02 23:55:52 -05:00
parent c49b811da3
commit 04e501d450
No known key found for this signature in database
GPG key ID: 02AA2BAE387C8307
2 changed files with 5 additions and 1 deletions

View file

@ -103,7 +103,7 @@ public class BuyerProcessDepositTxAndDelayedPayoutTxMessage extends TradeTask {
trade.setTakerContractSignature(signature);
}
byte[] contractHash = Hash.getSha256Hash(checkNotNull(trade.getContractAsJson()));
byte[] contractHash = Hash.getSha256Hash(checkNotNull(contractAsJson));
trade.setContractHash(contractHash);
}

View file

@ -42,6 +42,7 @@ import bisq.core.trade.protocol.bisq_v1.model.ProcessModel;
import bisq.core.trade.protocol.bisq_v1.tasks.TradeTask;
import bisq.core.util.JsonUtil;
import bisq.common.crypto.Hash;
import bisq.common.crypto.Sig;
import bisq.common.taskrunner.TaskRunner;
@ -91,6 +92,9 @@ public class SellerProcessShareBuyerPaymentAccountMessage extends TradeTask {
trade.setMakerContractSignature(signature);
}
byte[] contractHash = Hash.getSha256Hash(checkNotNull(contractAsJson));
trade.setContractHash(contractHash);
trade.setTradingPeerNodeAddress(processModel.getTempTradingPeerNodeAddress());
processModel.getTradeManager().requestPersistence();