Code Duplication    Length = 6-6 lines in 2 locations

src/Wallet.php 2 locations

@@ 698-703 (lines=6) @@
695
            $change = $this->determineChange($utxos, $send, $fee);
696
697
            // if change is not dust we need to add a change output
698
            if ($change > Blocktrail::DUST) {
699
                $send[] = ['address' => 'change', 'value' => $change];
700
            } else {
701
                // if change is dust we do nothing (implicitly it's added to the fee)
702
                $change = 0;
703
            }
704
        } else {
705
            $fee = $this->determineFee($utxos, $send, $txBuilder->getFeeStrategy(), $optimalFeePerKB, $lowPriorityFeePerKB);
706
@@ 728-733 (lines=6) @@
725
                    $change = $this->determineChange($utxos, $send, $fee2);
726
727
                    // if change is not dust we need to add a change output
728
                    if ($change > Blocktrail::DUST) {
729
                        $send[$changeIdx] = ['address' => 'change', 'value' => $change];
730
                    } else {
731
                        // if change is dust we do nothing (implicitly it's added to the fee)
732
                        $change = 0;
733
                    }
734
                }
735
            }
736
        }