Skip to content

Commit e808fae

Browse files
committed
chore: expect to panic_str
1 parent 9065747 commit e808fae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

contracts/solver-registry/src/admin.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ impl Contract {
6666
amount: U128,
6767
) -> PromiseOrValue<U128> {
6868
assert_one_yocto();
69-
let pool = self.pools.get(pool_id).expect("Pool not found");
69+
let pool = self
70+
.pools
71+
.get(pool_id)
72+
.unwrap_or_else(|| env::panic_str("Pool not found"));
7073
require!(pool.token_ids.contains(&token_id), "Invalid token ID");
7174
// We do not check that the amount does not exceed the pool balance because the solver registry
7275
// is not tracking the real-time NEAR Intents balance of the pool

0 commit comments

Comments
 (0)