[bisq-network/bisq] Add donation address check for open trades (#4135)

chimp1984 notifications at github.com
Wed Apr 8 01:03:13 UTC 2020

@chimp1984 commented on this pull request.

> +
+        // Get most recent donation address.
+        // We do not support past DAO param addresses to avoid that those receive funds (no bond set up anymore).
+        // Users who have not synced the DAO cannot trade.
+        String recentDonationAddressString = daoFacade.getParamValue(Param.RECIPIENT_BTC_ADDRESS);
+        // In case the seller has deactivated the DAO the default address will be used.
+        String defaultDonationAddressString = Param.RECIPIENT_BTC_ADDRESS.getDefaultValue();
+        TransactionOutput output = delayedPayoutTx.getOutput(0);
+        NetworkParameters params = btcWalletService.getParams();
+        Address address = output.getAddressFromP2PKHScript(params);
+        if (address == null) {
+            // The donation address can be as well be a multisig address.
+            address = output.getAddressFromP2SH(params);
+            checkNotNull(address, "address must not be null");

Wallet should be initiatialized at that moment. Why do you think it can cause an issue?

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200407/a0cf0682/attachment.html>

More information about the bisq-github mailing list