loopdb: state insufficient confirmed funds

pull/665/head
Slyghtning 5 months ago
parent 0060e3fe53
commit 0bd4b7cf89
No known key found for this signature in database
GPG Key ID: F82D456EA023C9BF

@ -291,6 +291,9 @@ func (s *swapClientServer) marshallSwap(loopSwap *loop.SwapInfo) (
case loopdb.StateFailAbandoned:
failureReason = clientrpc.FailureReason_FAILURE_REASON_ABANDONED
case loopdb.StateFailInsufficientConfirmedBalance:
failureReason = clientrpc.FailureReason_FAILURE_REASON_INSUFFICIENT_CONFIRMED_BALANCE
default:
return nil, fmt.Errorf("unknown swap state: %v", loopSwap.State)
}

@ -68,6 +68,10 @@ const (
// StateFailAbandoned indicates that a swap has been abandoned. Its
// execution has been canceled. It won't further be processed.
StateFailAbandoned SwapState = 11
// StateFailInsufficientConfirmedBalance indicates that the swap wasn't
// published due to insufficient confirmed balance.
StateFailInsufficientConfirmedBalance SwapState = 12
)
// SwapStateType defines the types of swap states that exist. Every swap state
@ -153,6 +157,9 @@ func (s SwapState) String() string {
case StateFailAbandoned:
return "FailAbandoned"
case StateFailInsufficientConfirmedBalance:
return "InsufficientConfirmedBalance"
default:
return "Unknown"
}

Loading…
Cancel
Save