[bisq-network/bisq] Add support for reimbursement requests (#1813)

sqrrm notifications at github.com
Wed Oct 24 19:24:50 UTC 2018


sqrrm approved this pull request.

utACK

> @@ -174,9 +191,11 @@ public Transaction completePreparedCompensationRequestTx(Coin issuanceAmount, Ad
         // BSQ change outputs from BSQ fee inputs.
         feeTx.getOutputs().forEach(preparedTx::addOutput);
 
-        // BSQ issuance output
-        preparedTx.addOutput(issuanceAmount, issuanceAddress);
-
+        //

```suggestion
        // For generic proposals there is no issuance output, for compensation and reimburse requests there is
```

>                  .forEach(txOutput -> {
+                    IssuanceType issuanceType = IssuanceType.UNDEFINED;
+                    if (issuanceProposal instanceof CompensationProposal) {
+                        issuanceType = IssuanceType.COMPENSATION;
+                    } else if (issuanceProposal instanceof ReimbursementProposal) {
+                        issuanceType = IssuanceType.REIMBURSEMENT;
+                    }
+                    checkArgument(issuanceType != IssuanceType.UNDEFINED, "issuanceType must nto be undefined");

```suggestion
                    checkArgument(issuanceType != IssuanceType.UNDEFINED, "issuanceType must not be undefined");
```

> + * under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Bisq is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Bisq. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package bisq.core.dao.state.governance;
+
+public enum IssuanceType {

GENESIS could be a reasonable type as well, no need really.

-- 
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/1813#pullrequestreview-168062337
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20181024/2a30b74d/attachment.html>


More information about the bisq-github mailing list