File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed
Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -7,5 +7,5 @@ use crate::Amount;
77pub struct PendingTransactionRecord {
88 pub transaction_id : String ,
99 pub fee : Amount ,
10- pub submitted_at : Option < String > ,
10+ pub submitted_at : Option < u64 > ,
1111}
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ pub struct MempoolItem {
1111 pub hash : Bytes32 ,
1212 pub aggregated_signature : Signature ,
1313 pub fee : u64 ,
14- pub submitted_timestamp : i64 ,
14+ pub submitted_timestamp : Option < u64 > ,
1515}
1616
1717impl Database {
@@ -188,7 +188,7 @@ async fn mempool_items_to_submit(
188188 hash : row. hash . convert ( ) ?,
189189 aggregated_signature : row. aggregated_signature . convert ( ) ?,
190190 fee : row. fee . convert ( ) ?,
191- submitted_timestamp : row. submitted_timestamp . unwrap_or ( 0 ) ,
191+ submitted_timestamp : row. submitted_timestamp . map ( |ts| ts as u64 ) ,
192192 } )
193193 } )
194194 . collect ( )
@@ -328,7 +328,7 @@ async fn mempool_items(conn: impl SqliteExecutor<'_>) -> Result<Vec<MempoolItem>
328328 hash : row. hash . convert ( ) ?,
329329 aggregated_signature : row. aggregated_signature . convert ( ) ?,
330330 fee : row. fee . convert ( ) ?,
331- submitted_timestamp : row. submitted_timestamp . unwrap_or ( 0 ) ,
331+ submitted_timestamp : row. submitted_timestamp . map ( |ts| ts as u64 ) ,
332332 } )
333333 } )
334334 . collect ( )
Original file line number Diff line number Diff line change @@ -494,7 +494,7 @@ impl Sage {
494494 Result :: Ok ( PendingTransactionRecord {
495495 transaction_id : hex:: encode ( tx. hash ) ,
496496 fee : Amount :: u64 ( tx. fee ) ,
497- submitted_at : Some ( tx. submitted_timestamp . to_string ( ) ) ,
497+ submitted_at : tx. submitted_timestamp ,
498498 } )
499499 } )
500500 . collect :: < Result < Vec < _ > > > ( ) ?;
Original file line number Diff line number Diff line change @@ -523,7 +523,7 @@ export type OptionAsset = { asset_id: string | null; amount: Amount }
523523export type OptionRecord = { launcher_id : string ; name : string | null ; visible : boolean ; coin_id : string ; address : string ; amount : Amount ; underlying_asset : Asset ; underlying_amount : Amount ; underlying_coin_id : string ; strike_asset : Asset ; strike_amount : Amount ; expiration_seconds : number ; created_height : number | null ; created_timestamp : number | null }
524524export type OptionSortMode = "name" | "created_height" | "expiration_seconds"
525525export type PeerRecord = { ip_addr : string ; port : number ; peak_height : number ; user_managed : boolean }
526- export type PendingTransactionRecord = { transaction_id : string ; fee : Amount ; submitted_at : string | null }
526+ export type PendingTransactionRecord = { transaction_id : string ; fee : Amount ; submitted_at : number | null }
527527export type PerformDatabaseMaintenance = { force_vacuum : boolean }
528528export type PerformDatabaseMaintenanceResponse = { vacuum_duration_ms : number ; analyze_duration_ms : number ; wal_checkpoint_duration_ms : number ; total_duration_ms : number ; pages_vacuumed : number ; wal_pages_checkpointed : number }
529529export type RedownloadNft = { nft_id : string }
You can’t perform that action at this time.
0 commit comments