Skip to content

Commit

Permalink
fix: expiry on lookup data
Browse files Browse the repository at this point in the history
  • Loading branch information
Rakowskiii committed Jul 28, 2023
1 parent fc3b84f commit f3a8d79
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export JUST_ROOT := justfile_directory()

run:
@echo '==> Running notify server'
cargo run
ANSI_LOGS=true cargo run

test ENV:
@echo '==> Running integration tests'
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async fn main() -> Result<()> {
tracing_subscriber::fmt()
.with_max_level(tracing::Level::from_str(&config.log_level).expect("Invalid log level"))
.with_span_events(FmtSpan::CLOSE)
.with_ansi(true)
.with_ansi(std::env::var("ANSI_LOGS").is_ok())
.init();

notify_server::bootstap(shutdown, config).await
Expand Down
1 change: 1 addition & 0 deletions src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ impl AppState {
topic: topic.clone(),
project_id: project_id.to_string(),
account: client_data.id.clone(),
expiry: client_data.expiry,
},
ReplaceOptions::builder().upsert(true).build(),
)
Expand Down
1 change: 1 addition & 0 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ pub struct LookupEntry {
pub topic: String,
pub project_id: String,
pub account: String,
pub expiry: u64,
}

#[derive(Debug)]
Expand Down
2 changes: 1 addition & 1 deletion tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn urls(env: String) -> (String, String) {
}
}

const TEST_ACCOUNT: &'static str = "eip155:123:test_account";
const TEST_ACCOUNT: &'static str = "eip155:123:123456789abcdef";

#[tokio::test]
async fn notify_properly_sending_message() {
Expand Down

0 comments on commit f3a8d79

Please sign in to comment.