We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9065747 commit e808faeCopy full SHA for e808fae
contracts/solver-registry/src/admin.rs
@@ -66,7 +66,10 @@ impl Contract {
66
amount: U128,
67
) -> PromiseOrValue<U128> {
68
assert_one_yocto();
69
- let pool = self.pools.get(pool_id).expect("Pool not found");
+ let pool = self
70
+ .pools
71
+ .get(pool_id)
72
+ .unwrap_or_else(|| env::panic_str("Pool not found"));
73
require!(pool.token_ids.contains(&token_id), "Invalid token ID");
74
// We do not check that the amount does not exceed the pool balance because the solver registry
75
// is not tracking the real-time NEAR Intents balance of the pool
0 commit comments