Code Duplication    Length = 6-6 lines in 2 locations

src/Wallet.php 2 locations

@@ 712-717 (lines=6) @@
709
            $change = $this->determineChange($utxos, $send, $fee);
710
711
            // if change is not dust we need to add a change output
712
            if ($change > Blocktrail::DUST) {
713
                $send[] = ['address' => 'change', 'value' => $change];
714
            } else {
715
                // if change is dust we do nothing (implicitly it's added to the fee)
716
                $change = 0;
717
            }
718
        } else {
719
            $fee = $this->determineFee($utxos, $send, $txBuilder->getFeeStrategy(), $optimalFeePerKB, $lowPriorityFeePerKB);
720
@@ 742-747 (lines=6) @@
739
                    $change = $this->determineChange($utxos, $send, $fee2);
740
741
                    // if change is not dust we need to add a change output
742
                    if ($change > Blocktrail::DUST) {
743
                        $send[$changeIdx] = ['address' => 'change', 'value' => $change];
744
                    } else {
745
                        // if change is dust we do nothing (implicitly it's added to the fee)
746
                        $change = 0;
747
                    }
748
                }
749
            }
750
        }