We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec24391 commit b46bb2cCopy full SHA for b46bb2c
src/Transaction/PSBT/Creator.php
@@ -10,15 +10,16 @@ class Creator
10
{
11
public function createPsbt(TransactionInterface $tx, array $unknowns = []): PSBT
12
13
+ $nIn = count($tx->getInputs());
14
$inputs = [];
- for ($i = 0; $i < count($tx->getInputs()); $i++) {
15
+ for ($i = 0; $i < $nIn; $i++) {
16
$inputs[] = new PSBTInput();
17
}
18
+ $nOut = count($tx->getOutputs());
19
$outputs = [];
- for ($i = 0; $i < count($tx->getOutputs()); $i++) {
20
+ for ($i = 0; $i < $nOut; $i++) {
21
$outputs[] = new PSBTOutput();
22
-
23
return new PSBT($tx, $unknowns, $inputs, $outputs);
24
25
0 commit comments