-
Notifications
You must be signed in to change notification settings - Fork 9
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
fix liquid pending timestamp #613
Conversation
lib/core/src/persist/mod.rs
Outdated
@@ -268,7 +268,7 @@ impl Persister { | |||
ptx.tx_id NOT IN (SELECT refund_tx_id FROM chain_swaps WHERE refund_tx_id NOT NULL) | |||
AND {} | |||
ORDER BY -- Order by swap creation time or tx timestamp (in case of direct tx) | |||
COALESCE(rs.created_at, ss.created_at, cs.created_at, ptx.timestamp) DESC | |||
COALESCE(rs.created_at, ss.created_at, cs.created_at, ptx.timestamp, strftime('%s', 'now')) DESC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to store the "seen" time (current time) in the db in this case if there is no tx timestamp? Otherwise won't these payments bubble up the payment list
edit: maybe it isn't a bad thing as the eventual tx timestamp will be later anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense but I will need to make sure we don't override the timestamp as we are doing "insert or replace" for tx_data.
I will take a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
fix liquid panding timestamp
Before this PR pending liquid transactions that were synced were shown at the bottom of the list payments.
This is because their timestamp was null as there was no swap and the transactions was in the mempool.
Now it fallbacks to the current timestamp for pending transaction.
fixed #611