Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

faucet: remove key if pubkey can't be looked up #1201

Merged
merged 5 commits into from
Jul 18, 2022
Merged

Conversation

sveitser
Copy link
Contributor

Depends on

Also need to tag a seahorse release and reference it here.

@sveitser sveitser requested a review from jbearer July 18, 2022 12:28
// If we failed, mark the request as failed in the queue so it can be retried
// later.
state.queue.fail(pub_key).await;
if let seahorse::WalletError::PubkeyNotFound { address } = err {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also CapeWalletError::PubKeyNotFound should work

@@ -525,23 +525,6 @@ async fn request_fee_assets(
) -> Result<tide::Response, tide::Error> {
check_service_available(req.state()).await?;
let pub_key: UserPubKey = net::server::request_body(&mut req).await?;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we keep this so that in the future, if the user submits a request for a key that is not in the address book, they get an error response instead of an ok response that later fails silently?

@sveitser sveitser enabled auto-merge (squash) July 18, 2022 19:16
@sveitser sveitser merged commit ef77622 into main Jul 18, 2022
@sveitser sveitser deleted the handle-pubkey-not-found branch July 18, 2022 20:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants