<p><code>BtcWalletService</code> was changed to allow the api to override tx fee rates from the <code>sendbsq</code> and <code>sendbtc</code> methods.  The api methods will still be able to use the network fee service and custom tx fee rate preference, and set / unset the custom tx fee rate preference, but the change will permit the addition of an optional <code>txFeeRate</code> parameter to the <code>sendbsq</code> and <code>sendbtc</code> methods (todo).  A few other minor changes (style and removal of never thrown ex spec) were also made to this class.</p>
<p>Two <code>BtcWalletService</code> methods were refactored.</p>
<ul>
<li>
<p>The redundant (was always true) <code>boolean isSendTx</code> argument was removed from the <code>completePreparedVoteRevealTx</code> method signature.</p>
</li>
<li>
<p>The redundant (was always true) <code>boolean useCustomTxFee</code> was removed from the <code>completePreparedBsqTx</code> method signature.</p>
</li>
<li>
<p>The <code>completePreparedSendBsqTx</code> method was overloaded with a 2nd parameter (<code>Coin txFeePerVbyte</code>) to allow api to override fee service and custom tx fee rate when sending BSQ or BTC.</p>
</li>
<li>
<p>The <code>completePreparedBsqTx</code> method was overloaded with a 3rd parameter (<code>Coin txFeePerVbyte</code>) to allow api to override fee service and custom tx fee rate when sending BSQ or BTC.</p>
</li>
</ul>
<p>The following line was deleted from the <code>completePreparedBsqTx</code> method because <code>txFeePerVbyte</code> is now an argument:</p>
<pre><code>`Coin txFeePerVbyte = useCustomTxFee ? getTxFeeForWithdrawalPerVbyte() : feeService.getTxFeePerVbyte();`
</code></pre>
<p>This <code>useCustomTxFee</code> value was always true, and redundant here because  <code>getTxFeeForWithdrawalPerVbyte()</code> returns <code>feeService.getTxFeePerVbyte()</code> or the custom fee rate preference. i.e.,</p>
<p><code>Coin txFeePerVbyte = useCustomTxFee ? getTxFeeForWithdrawalPerVbyte() : feeService.getTxFeePerVbyte();</code><br>
is equivalent to<br>
<code>Coin txFeePerVbyte = getTxFeeForWithdrawalPerVbyte();</code></p>
<p><code>LockupTxService</code>, <code>UnlockTxService</code>, <code>BsqSendView</code>, and <code>BsqTransferService</code> were adjusted to the <code>BtcWalletService</code> refactoring.</p>
<p>This is the 2st in a chain of PRs beginning with <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="756290293" data-permission-text="Title is private" data-url="https://github.com/bisq-network/bisq/issues/4884" data-hovercard-type="pull_request" data-hovercard-url="/bisq-network/bisq/pull/4884/hovercard" href="https://github.com/bisq-network/bisq/pull/4884">#4884</a>.<br>
PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="756290293" data-permission-text="Title is private" data-url="https://github.com/bisq-network/bisq/issues/4884" data-hovercard-type="pull_request" data-hovercard-url="/bisq-network/bisq/pull/4884/hovercard" href="https://github.com/bisq-network/bisq/pull/4884">#4884</a> should be reviewed before this one.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/bisq-network/bisq/pull/4896'>https://github.com/bisq-network/bisq/pull/4896</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Refactor: move getDust(Transaction transaction)</li>
  <li>Refactor BtcWalletService to let api override fee rates</li>
  <li>Merge branch 'master' into 02-refactor-completePreparedSendBsqTx</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4896/files#diff-51ad8d296d65d6b3ce8dc9791aa5a912f3ed622796fcd9853692711086c48972">core/src/main/java/bisq/core/btc/wallet/BsqTransferService.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4896/files#diff-75820b5165905d1e3a47d5fe31e4b5dba017c6b25a322aad955ffa592a67b362">core/src/main/java/bisq/core/btc/wallet/BtcWalletService.java</a>
    (40)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4896/files#diff-7f839642c099f9c286c0f26df5f69ded7608f780f0ee5f3fbc59175c6ac7fbda">core/src/main/java/bisq/core/btc/wallet/WalletService.java</a>
    (14)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4896/files#diff-56c1ef7bad0acf4aaabd20d77fe9c3a1fcee2dd75665b605cb1d9217115ec0dd">core/src/main/java/bisq/core/dao/governance/bond/lockup/LockupTxService.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4896/files#diff-149b20e6e9412d3da47778e9e0fde8fb014864693abd9e036df4154e86bb08b2">core/src/main/java/bisq/core/dao/governance/bond/unlock/UnlockTxService.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4896/files#diff-129ab70d7a6a053bd296608a694f5ce120f764cb1c5ce4ec7d6a7d55a1efff92">desktop/src/main/java/bisq/desktop/main/dao/wallet/send/BsqSendView.java</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4896/files#diff-1899e161042b90cb20b10511f052d0c6237757c97ba32fb35dddb31fccb9cb4b">desktop/src/main/java/bisq/desktop/main/funds/withdrawal/WithdrawalView.java</a>
    (20)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/bisq-network/bisq/pull/4896.patch'>https://github.com/bisq-network/bisq/pull/4896.patch</a></li>
  <li><a href='https://github.com/bisq-network/bisq/pull/4896.diff'>https://github.com/bisq-network/bisq/pull/4896.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/4896">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNQ2O3LDJU2RVVO3O4LSTEL4ZANCNFSM4UNXH3MA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNXY5ODR5MNMW55D6N3STEL4ZA5CNFSM4UNXH3MKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4LJDCMSA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/4896",
"url": "https://github.com/bisq-network/bisq/pull/4896",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>