[bisq-network/bisq] Add cancel trade feature (#4514)
chimp1984
notifications at github.com
Thu Sep 17 01:02:41 UTC 2020
@chimp1984 commented on this pull request.
> + Transaction preparedPayoutTx = createPayoutTx(depositTx, buyerPayoutAmount, sellerPayoutAmount, buyerPayoutAddressString, sellerPayoutAddressString);
+ // MS redeemScript
+ Script redeemScript = get2of2MultiSigRedeemScript(buyerPubKey, sellerPubKey);
+ // MS output from prev. tx is index 0
+ Sha256Hash sigHash = preparedPayoutTx.hashForSignature(0, redeemScript, Transaction.SigHash.ALL, false);
+ checkNotNull(myMultiSigKeyPair, "myMultiSigKeyPair must not be null");
+ if (myMultiSigKeyPair.isEncrypted()) {
+ checkNotNull(aesKey);
+ }
+ ECKey.ECDSASignature mySignature = myMultiSigKeyPair.sign(sigHash, aesKey).toCanonicalised();
+ WalletService.printTx("prepared canceled trade payoutTx for sig creation", preparedPayoutTx);
+ WalletService.verifyTransaction(preparedPayoutTx);
+ return mySignature.encodeToDER();
+ }
+
+ public Transaction finalizeCanceledTradePayoutTx(Transaction depositTx,
Yes, agree. Will look into it.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/4514#discussion_r489838172
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200916/634801b2/attachment.html>
More information about the bisq-github
mailing list