mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-02-23 14:50:42 +01:00
Use Wallet's transactionDAO instead of creating a copy (#3377)
* Use Wallet's transactionDAO instead of creating a copy * remove import
This commit is contained in:
parent
253f7444c6
commit
a82f5aa832
1 changed files with 2 additions and 3 deletions
|
@ -29,7 +29,6 @@ import org.bitcoins.dlc.wallet.models._
|
|||
import org.bitcoins.dlc.wallet.util.DLCStatusBuilder
|
||||
import org.bitcoins.keymanager.bip39.BIP39KeyManager
|
||||
import org.bitcoins.wallet.config.WalletAppConfig
|
||||
import org.bitcoins.wallet.models.TransactionDAO
|
||||
import org.bitcoins.wallet.{Wallet, WalletLogger}
|
||||
import scodec.bits.ByteVector
|
||||
|
||||
|
@ -61,7 +60,6 @@ abstract class DLCWallet
|
|||
private[bitcoins] val dlcSigsDAO: DLCCETSignaturesDAO = DLCCETSignaturesDAO()
|
||||
private[bitcoins] val dlcRefundSigDAO: DLCRefundSigsDAO = DLCRefundSigsDAO()
|
||||
private[bitcoins] val remoteTxDAO: DLCRemoteTxDAO = DLCRemoteTxDAO()
|
||||
private[bitcoins] val txDAO: TransactionDAO = TransactionDAO()
|
||||
|
||||
private def calcContractId(offer: DLCOffer, accept: DLCAccept): ByteVector = {
|
||||
val builder = DLCTxBuilder(offer, accept.withoutSigs)
|
||||
|
@ -1283,7 +1281,8 @@ abstract class DLCWallet
|
|||
}
|
||||
|
||||
private def getClosingTxOpt(dlcDb: DLCDb): Future[Option[TransactionDb]] = {
|
||||
val result = dlcDb.closingTxIdOpt.map(txid => txDAO.findByTxId(txid))
|
||||
val result =
|
||||
dlcDb.closingTxIdOpt.map(txid => transactionDAO.findByTxId(txid))
|
||||
result match {
|
||||
case None => Future.successful(None)
|
||||
case Some(r) => r
|
||||
|
|
Loading…
Add table
Reference in a new issue