Skip to content

Commit e861d98

Browse files
authored
Update escrow.move
1 parent 6621a27 commit e861d98

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

escrow/sources/escrow.move

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,21 @@ module Escrow::escrow {
5353
d.completed = true;
5454
}
5555

56-
/// Утилиты, чтобы потребить ресурсы и избежать implicit drop
56+
/// Внутренние “пожиратели” ресурсов (чтобы избежать implicit drop)
5757
fun destroy_wallet(w: Wallet) {
5858
let Wallet { balance: _ } = w;
5959
}
6060
fun destroy_deal(d: Deal) {
6161
let Deal { buyer: _, seller: _, amount: _, funded: _, completed: _ } = d;
6262
}
6363

64+
/// Публичные обёртки для юнит-тестов
65+
#[test_only]
66+
public fun destroy_wallet_for_test(w: Wallet) { destroy_wallet(w); }
67+
68+
#[test_only]
69+
public fun destroy_deal_for_test(d: Deal) { destroy_deal(d); }
70+
6471
/// DEMO entry: депозит → фандинг → релиз
6572
public entry fun entry_demo(_s: &signer) {
6673
let bw = new_wallet();

0 commit comments

Comments
 (0)