Skip to content

Commit

Permalink
pay: fix duplicated inputs
Browse files Browse the repository at this point in the history
Closes #117
  • Loading branch information
dr-orlovsky committed Feb 27, 2024
1 parent 176ec3a commit 1d067f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use std::collections::BTreeSet;
use std::convert::Infallible;

use amplify::confinement::Confined;
Expand Down Expand Up @@ -223,7 +224,7 @@ impl Runtime {
}
})
.map(|a| a.seal)
.collect::<Vec<_>>()
.collect::<BTreeSet<_>>()
}
_ => return Err(CompositionError::Unsupported),
};
Expand All @@ -238,6 +239,7 @@ impl Runtime {
};
let outpoints = outputs
.iter()
// TODO: Support liquid
.map(|o| o.as_reduced_unsafe())
.map(|o| Outpoint::new(o.txid, o.vout));
params.tx.change_keychain = RgbKeychain::for_method(method).into();
Expand Down

0 comments on commit 1d067f3

Please sign in to comment.