mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-02-22 23:59:49 -05:00
Replace chrono with time lib
This commit is contained in:
parent
394adb0a4f
commit
f91d8ab45c
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -4117,7 +4117,6 @@ dependencies = [
|
||||
"bitcoin",
|
||||
"bitcoin-harness",
|
||||
"bmrng",
|
||||
"chrono",
|
||||
"comfy-table",
|
||||
"config",
|
||||
"conquer-once",
|
||||
|
@ -19,7 +19,6 @@ bdk = "0.10"
|
||||
big-bytes = "1"
|
||||
bitcoin = { version = "0.26", features = [ "rand", "use-serde" ] }
|
||||
bmrng = "0.5"
|
||||
chrono = "0.4"
|
||||
comfy-table = "4.1.1"
|
||||
config = { version = "0.11", default-features = false, features = [ "toml" ] }
|
||||
conquer-once = "0.3"
|
||||
|
@ -3,12 +3,12 @@ use crate::monero::Address;
|
||||
use crate::protocol::{Database, State};
|
||||
use anyhow::{Context, Result};
|
||||
use async_trait::async_trait;
|
||||
use chrono::Utc;
|
||||
use libp2p::{Multiaddr, PeerId};
|
||||
use sqlx::sqlite::Sqlite;
|
||||
use sqlx::{Pool, SqlitePool};
|
||||
use std::path::Path;
|
||||
use std::str::FromStr;
|
||||
use time::OffsetDateTime;
|
||||
use uuid::Uuid;
|
||||
|
||||
pub struct SqliteDatabase {
|
||||
@ -171,7 +171,7 @@ impl Database for SqliteDatabase {
|
||||
|
||||
async fn insert_latest_state(&self, swap_id: Uuid, state: State) -> Result<()> {
|
||||
let mut conn = self.pool.acquire().await?;
|
||||
let entered_at = Utc::now();
|
||||
let entered_at = OffsetDateTime::now_utc();
|
||||
|
||||
let swap_id = swap_id.to_string();
|
||||
let swap = serde_json::to_string(&Swap::from(state))?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user