|
@@ 641-646 (lines=6) @@
|
| 638 |
|
$change = $this->determineChange($utxos, $send, $fee); |
| 639 |
|
|
| 640 |
|
// if change is not dust we need to add a change output |
| 641 |
|
if ($change > Blocktrail::DUST) { |
| 642 |
|
$send[] = ['address' => 'change', 'value' => $change]; |
| 643 |
|
} else { |
| 644 |
|
// if change is dust we do nothing (implicitly it's added to the fee) |
| 645 |
|
$change = 0; |
| 646 |
|
} |
| 647 |
|
} else { |
| 648 |
|
$fee = $this->determineFee($utxos, $send, $txBuilder->getFeeStrategy(), $optimalFeePerKB, $lowPriorityFeePerKB); |
| 649 |
|
|
|
@@ 671-676 (lines=6) @@
|
| 668 |
|
$change = $this->determineChange($utxos, $send, $fee2); |
| 669 |
|
|
| 670 |
|
// if change is not dust we need to add a change output |
| 671 |
|
if ($change > Blocktrail::DUST) { |
| 672 |
|
$send[$changeIdx] = ['address' => 'change', 'value' => $change]; |
| 673 |
|
} else { |
| 674 |
|
// if change is dust we do nothing (implicitly it's added to the fee) |
| 675 |
|
$change = 0; |
| 676 |
|
} |
| 677 |
|
} |
| 678 |
|
} |
| 679 |
|
} |