mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-02-24 15:02:17 +01:00
Use upsert rather than create as offers can use the same outpoints if negotiation fails for some reason (#4247)
This commit is contained in:
parent
1bc3962cfb
commit
30a061e549
1 changed files with 4 additions and 4 deletions
|
@ -34,12 +34,12 @@ case class DLCActionBuilder(dlcWalletDAOs: DLCWalletDAOs) {
|
||||||
Unit,
|
Unit,
|
||||||
NoStream,
|
NoStream,
|
||||||
Effect.Read with Effect.Write with Effect.Transactional] = {
|
Effect.Read with Effect.Write with Effect.Transactional] = {
|
||||||
val globalAction = dlcDAO.createAction(dlcDb)
|
val globalAction = dlcDAO.upsertAction(dlcDb)
|
||||||
val contractAction = contractDataDAO.createAction(contractDataDb)
|
val contractAction = contractDataDAO.upsertAction(contractDataDb)
|
||||||
val announcementAction =
|
val announcementAction =
|
||||||
dlcAnnouncementDAO.createAllAction(dlcAnnouncementDbs)
|
dlcAnnouncementDAO.upsertAllAction(dlcAnnouncementDbs)
|
||||||
val inputsAction = dlcInputsDAO.upsertAllAction(dlcInputs)
|
val inputsAction = dlcInputsDAO.upsertAllAction(dlcInputs)
|
||||||
val offerAction = dlcOfferDAO.createAction(dlcOfferDb)
|
val offerAction = dlcOfferDAO.upsertAction(dlcOfferDb)
|
||||||
val actions = Vector(globalAction,
|
val actions = Vector(globalAction,
|
||||||
contractAction,
|
contractAction,
|
||||||
announcementAction,
|
announcementAction,
|
||||||
|
|
Loading…
Add table
Reference in a new issue