Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TRIVIAL] Maintaining quote verified flag when creating an order #3234

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions crates/e2e/tests/e2e/place_order_with_quote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ async fn place_order_with_quote(web3: Web3) {
let quote_response = services.submit_quote(&quote_request).await.unwrap();
tracing::debug!(?quote_response);
assert!(quote_response.id.is_some());
assert!(quote_response.verified);

let quote_metadata =
crate::database::quote_metadata(services.db(), quote_response.id.unwrap()).await;
Expand Down Expand Up @@ -99,9 +100,8 @@ async fn place_order_with_quote(web3: Web3) {
&database::byte_array::ByteArray(order_uid.0),
)
.await
.unwrap()
.unwrap();
assert!(order_quote.is_some());
// compare quote metadata and order quote metadata
let order_quote_metadata = order_quote.unwrap().metadata;
assert_eq!(quote_metadata.unwrap().0, order_quote_metadata);
assert_eq!(quote_response.verified, order_quote.verified);
assert_eq!(quote_metadata.unwrap().0, order_quote.metadata);
}
4 changes: 1 addition & 3 deletions crates/shared/src/order_quoting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,7 @@ impl TryFrom<QuoteRow> for QuoteData {
expiration: row.expiration_timestamp,
quote_kind: row.quote_kind,
solver: H160(row.solver.0),
// Even if the quote was verified at the time of creation
// it might no longer be accurate.
verified: false,
verified: row.verified,
metadata: row.metadata.try_into()?,
})
}
Expand Down
Loading