Skip to content

Commit baa63f6

Browse files
authored
Sort session events by auto-incrementing id (payjoin#1202)
2 parents 92dc5ec + 78214b6 commit baa63f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

payjoin-cli/src/db/v2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl SessionPersister for SenderPersister {
6868
{
6969
let conn = self.db.get_connection()?;
7070
let mut stmt = conn.prepare(
71-
"SELECT event_data FROM send_session_events WHERE session_id = ?1 ORDER BY created_at ASC",
71+
"SELECT event_data FROM send_session_events WHERE session_id = ?1 ORDER BY id ASC",
7272
)?;
7373

7474
let event_rows = stmt.query_map(params![*self.session_id], |row| {
@@ -149,7 +149,7 @@ impl SessionPersister for ReceiverPersister {
149149
> {
150150
let conn = self.db.get_connection()?;
151151
let mut stmt = conn.prepare(
152-
"SELECT event_data FROM receive_session_events WHERE session_id = ?1 ORDER BY created_at ASC",
152+
"SELECT event_data FROM receive_session_events WHERE session_id = ?1 ORDER BY id ASC",
153153
)?;
154154

155155
let event_rows = stmt.query_map(params![*self.session_id], |row| {

0 commit comments

Comments
 (0)