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 91d7d3c commit e8a9638Copy full SHA for e8a9638
crates/wallet/src/wallet/mod.rs
@@ -1879,8 +1879,11 @@ impl Wallet {
1879
Ok(_) => {
1880
// Set the UTXO fields, final script_sig and witness
1881
// and clear everything else.
1882
- let original = mem::take(&mut psbt.inputs[n]);
1883
- let psbt_input = &mut psbt.inputs[n];
+ let psbt_input = psbt
+ .inputs
1884
+ .get_mut(n)
1885
+ .ok_or(SignerError::InputIndexOutOfRange)?;
1886
+ let original = mem::take(psbt_input);
1887
psbt_input.non_witness_utxo = original.non_witness_utxo;
1888
psbt_input.witness_utxo = original.witness_utxo;
1889
if !tmp_input.script_sig.is_empty() {
0 commit comments