The DLC does not concern the UI, hence the amounts should be handles in satoshi.
Note: This commit enforces db reset of CFDs that are stored in `as_btc`.
We are looping over multiple CFDs when trying to publish the CET.
If we fail inside the loop then the next CFD(s) are not processed and CETs might not get published properly.
This should make the code more resilient.
Reasoning:
The state transition can fail, hence the result.
It can, however, happen that there is no failure, but we still did not transition to a new state.
In such cases we don't want to save the state in the database because it would be an unwanted duplicated entry.
The `Attestation` in the `oracle` module has `Desiarialization` rules that conflict with loading it from the db.
We should not reuse domain structs between modules anyway, so this was cleaned up by introducing a dedicated `model::Attestation` and mapping to `oracle::Attestation`.
252: Rework oracle actor communication r=da-kami a=da-kami
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
Co-authored-by: Daniel Karzel <daniel@comit.network>
Note: Since our sliding window of `next_24_hours` in the oracle actor is current hour `+[1..24]` the window should always be able to handle fetching an event of current hour + 1.
211: Rename "Accept / Reject" to "Pending" in CfdTables r=klochowicz a=klochowicz
Pending is a more succinct nudge to the user that they should react with an
action to the CFDs inside these tables.
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
Instead of the oracle actor sending out the `Announcements` we only store them internally and let the cfd actors chose what `Announcement` is relevant given the term of the offer.
The specific `Announcement` is then fetched from the oracle actor.
The monitoring logic for pending attestations remains the same.
249: First cet trial fixes r=da-kami a=da-kami
Note: Just discussed with `@thomaseizinger` that the Oracle actor should be changed to be able to handle multiple terms.
So, instead of the oracle actor sending out the current 24 hours to the cfd actor, the cfd actor should be able to request events for a time interval (i.e. different terms).
Changing that should also allow us to test more easily, because we can use a very short term.
Co-authored-by: Daniel Karzel <daniel@comit.network>
250: Roll over bug fixes r=bonomat a=bonomat
With these bugs fixed we get all the way back into `Open` state :)
Co-authored-by: Philipp Hoenisch <philipp@hoenisch.at>
240: Implement rollover protocol in daemons r=luckysori a=luckysori
Fix#136.
Co-authored-by: Lucas Soriano del Pino <l.soriano.del.pino@gmail.com>
Co-authored-by: Philipp Hoenisch <philipp@hoenisch.at>
245: Spread of `0.3%` instead of `3%` r=da-kami a=da-kami
Co-authored-by: Daniel Karzel <daniel@comit.network>
Co-authored-by: Daniel Karzel <daniel.karzel@coblox.tech>
Block until we are sure that the update was done, because otherwise we might have weird side effects in the UI because there is a dependency on the announcements being available when creating offers.
227: Handle collab settlement response from the maker r=klochowicz a=klochowicz
- store TakerId for proposals to be able to respond to specific taker about
settlement proposal when the user takes action
- send the collab settlement response (accept or reject) from the maker
- handle rejection (remove from the map), CFD state in the UI returns to "Open"
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
- store TakerId for proposals to be able to respond to specific taker about
settlement proposal when the user takes action
- send the collab settlement response (accept or reject) from the maker
- handle rejection (remove from the map), CFD state in the UI returns to "Open"