mirror of
https://github.com/getAlby/hub.git
synced 2026-08-13 12:33:39 +02:00
chore: minor changes
Some checks are pending
Multiplatform Docker build & push / build (push) Waiting to run
Some checks are pending
Multiplatform Docker build & push / build (push) Waiting to run
This commit is contained in:
parent
e6354d1ceb
commit
1f888e0876
2 changed files with 2 additions and 15 deletions
|
|
@ -135,7 +135,7 @@ function SwapInForm() {
|
|||
...(swapFrom === "internal"
|
||||
? {
|
||||
internalPayment: true,
|
||||
...(feeRate ? { feeRate: parseInt(feeRate) } : {}),
|
||||
...(feeRate ? { feeRate: +feeRate } : {}),
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -499,8 +499,7 @@ func (svc *swapsService) SwapIn(amountSat uint64, autoSwap bool, internalPayment
|
|||
logger.Logger.WithField("swapId", swap.Id).Info("Swap created")
|
||||
|
||||
if internalPayment {
|
||||
var lockupTxId string
|
||||
lockupTxId, err = svc.lnClient.RedeemOnchainFunds(svc.ctx, swap.Address, swap.ExpectedAmount, feeRate, false)
|
||||
_, err = svc.lnClient.RedeemOnchainFunds(svc.ctx, swap.Address, swap.ExpectedAmount, feeRate, false)
|
||||
if err != nil {
|
||||
logger.Logger.WithError(err).WithFields(logrus.Fields{
|
||||
"swapId": swap.Id,
|
||||
|
|
@ -508,18 +507,6 @@ func (svc *swapsService) SwapIn(amountSat uint64, autoSwap bool, internalPayment
|
|||
}).Error("Failed to fund internal swap in")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = svc.db.Model(&dbSwap).Updates(&db.Swap{
|
||||
LockupTxId: lockupTxId,
|
||||
}).Error
|
||||
if err != nil {
|
||||
logger.Logger.WithError(err).WithFields(logrus.Fields{
|
||||
"swapId": swap.Id,
|
||||
"lockupTxId": lockupTxId,
|
||||
}).Error("Failed to save internal swap lockup txid")
|
||||
return nil, err
|
||||
}
|
||||
dbSwap.LockupTxId = lockupTxId
|
||||
}
|
||||
|
||||
go svc.startSwapInListener(&dbSwap)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue