mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2026-01-29 02:44:40 +01:00
Improve stream handling (#244)
* Improve stream management * Check swap for existing lockup/refund tx * Set broadcast capacity to 30
This commit is contained in:
@@ -428,21 +428,21 @@ fun asSendPaymentResponse(sendPaymentResponse: ReadableMap): SendPaymentResponse
|
||||
if (!validateMandatoryFields(
|
||||
sendPaymentResponse,
|
||||
arrayOf(
|
||||
"txid",
|
||||
"payment",
|
||||
),
|
||||
)
|
||||
) {
|
||||
return null
|
||||
}
|
||||
val txid = sendPaymentResponse.getString("txid")!!
|
||||
val payment = sendPaymentResponse.getMap("payment")?.let { asPayment(it) }!!
|
||||
return SendPaymentResponse(
|
||||
txid,
|
||||
payment,
|
||||
)
|
||||
}
|
||||
|
||||
fun readableMapOf(sendPaymentResponse: SendPaymentResponse): ReadableMap {
|
||||
return readableMapOf(
|
||||
"txid" to sendPaymentResponse.txid,
|
||||
"payment" to readableMapOf(sendPaymentResponse.payment),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user