Skip to content

Commit e83fbf1

Browse files
committed
support rune offer acceptance across multiple utxos, updated documentation
1 parent df85f7b commit e83fbf1

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docs/src/guides/wallet.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,13 +465,13 @@ ord wallet offer create --rune <DECIMAL:RUNE> --fee-rate <FEE_RATE> --amount <AM
465465
Accepting an Inscription or Runes Buy Offer
466466
-------------------------------------------
467467

468-
Accept the offer to buy the inscription `INSCRIPTION_ID` for `AMOUNT` via `PSBT` using:
468+
Accept the offer to buy the inscription `INSCRIPTION_ID` for `AMOUNT` in `PSBT` using:
469469

470470
```
471471
ord wallet offer accept --inscription <INSCRIPTION_ID> --amount <AMOUNT> --psbt <PSBT>
472472
```
473473

474-
Accept the offer to buy the rune balance `DECIMAL:RUNE` sold in `PSBT` using:
474+
Accept the offer to buy the rune balance `DECIMAL:RUNE` in `PSBT` using:
475475

476476
```
477477
ord wallet offer accept --rune <DECIMAL:RUNE> --amount <AMOUNT> --psbt <PSBT>

src/subcommand/wallet/offer/accept.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,27 +200,27 @@ impl Accept {
200200
let mut contains_multiple_runes = false;
201201
let mut amount = 0;
202202

203-
for (_, utxo) in &outgoing {
203+
for utxo in outgoing.values() {
204204
let Some(runes) = wallet.get_runes_balances_in_output(utxo)? else {
205205
bail! {
206206
"outgoing input {} contains no runes",
207-
*utxo
207+
utxo
208208
}
209209
};
210210

211211
if let Some(inscriptions) = wallet.get_inscriptions_in_output(utxo)? {
212212
ensure! {
213213
inscriptions.is_empty(),
214214
"outgoing input {} contains {} inscription(s)",
215-
*utxo,
215+
utxo,
216216
inscriptions.len()
217217
}
218218
};
219219

220220
let Some(pile) = runes.get(&spaced_rune) else {
221221
bail!(format!(
222222
"outgoing input {} does not contain rune {}",
223-
*utxo, spaced_rune
223+
utxo, spaced_rune
224224
));
225225
};
226226

@@ -258,7 +258,7 @@ impl Accept {
258258
ensure! {
259259
!unsigned_tx.output.is_empty() &&
260260
outgoing.values().any(|outgoing| {
261-
unsigned_tx.output[0].script_pubkey == wallet.utxos().get(&outgoing).unwrap().script_pubkey
261+
unsigned_tx.output[0].script_pubkey == wallet.utxos().get(outgoing).unwrap().script_pubkey
262262
}),
263263
"unexpected seller address in PSBT"
264264
}

0 commit comments

Comments
 (0)