Skip to content

Commit

Permalink
Merge pull request #397 from icon-project/fix/close-redundant-proxy-r…
Browse files Browse the repository at this point in the history
…equest-account

fix: close redundant proxy request account
  • Loading branch information
gcranju authored Oct 18, 2024
2 parents f45ede8 + 7cc4e80 commit cb69b17
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ pub fn handle_request(
pending_request.sources.push(source.owner.to_owned())
}
if pending_request.sources.len() != req.protocols().len() {
// close the proxy request as it's no longer needed
ctx.accounts
.proxy_request
.close(ctx.accounts.signer.to_account_info())?;

return Ok(());
}
pending_request.close(ctx.accounts.admin.clone())?;
Expand Down

0 comments on commit cb69b17

Please sign in to comment.