feat(tauri, gui): Send event on changes to details, timelocks and tx_lock confirmations (#100)

- Send event when new swap state is inserated into database. The event only has the `swap_id` attached. The frontend then sends a request to the `get_swap_info` command to retrieve the updated version
- Send event when the Bitcoin lock transaction gets a new confirmation 
- A new `watcher` daemon runs contineously and sends an event when the timelock updated. The event has the the `swap_id` and the timelock attached
- Display logs on `ProcessExitedPage` (if swap was stopped prematurely)
- Rename `CliLogEmittedEvent` to `TauriLogEvent`
- Apply env_filter to tracing terminal writer to silence logging from other crates
- Add `.env.*` files in `src-gui` to `.gitingore`

Closes #93 and #12
This commit is contained in:
binarybaron 2024-10-09 19:06:57 +06:00 committed by GitHub
parent e6dc7ddcef
commit 8f33fe5b41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 429 additions and 208 deletions

View file

@ -15,15 +15,13 @@ export function AmountWithUnit({
fixedPrecision: number;
dollarRate?: Amount;
}) {
const title =
dollarRate != null && amount != null
? `$${(dollarRate * amount).toFixed(2)}`
: "";
return (
<Tooltip
arrow
title={
dollarRate != null && amount != null
? `$${(dollarRate * amount).toFixed(2)}`
: ""
}
>
<Tooltip arrow title={title}>
<span>
{amount != null
? Number.parseFloat(amount.toFixed(fixedPrecision))