Skip to content

Commit c93a6cb

Browse files
committed
fix(rpc): use pre-resolved challenge_uuid in challenge_call verification
1 parent bd6e305 commit c93a6cb

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

crates/rpc-server/src/jsonrpc.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,7 @@ impl RpcHandler {
11561156
.unwrap_or_default();
11571157

11581158
// Resolve challenge_id (can be UUID or name like "bounty-challenge")
1159-
let (resolved_id, _challenge_uuid) = {
1159+
let (resolved_id, challenge_uuid) = {
11601160
let chain = self.chain_state.read();
11611161

11621162
// Try parsing as UUID first
@@ -1192,13 +1192,9 @@ impl RpcHandler {
11921192
}
11931193
};
11941194

1195-
// Verify the challenge has registered routes
1195+
// Verify the challenge has registered routes (use pre-resolved UUID)
11961196
{
11971197
let chain = self.chain_state.read();
1198-
let challenge_uuid = uuid::Uuid::parse_str(&resolved_id)
1199-
.ok()
1200-
.map(|u| platform_core::ChallengeId(u.to_string()));
1201-
12021198
let has_routes = challenge_uuid
12031199
.as_ref()
12041200
.map(|cid| chain.challenge_routes.contains_key(cid))

0 commit comments

Comments
 (0)