mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2025-12-23 00:44:26 +01:00
Return pending payment (#245)
* Return pending payment * Simplify select loop * Revert dart pubspec * Add error logging for payment events without swap ids Co-authored-by: ok300 <106775972+ok300@users.noreply.github.com> --------- Co-authored-by: ok300 <106775972+ok300@users.noreply.github.com>
This commit is contained in:
@@ -697,27 +697,31 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
wireObj.tag = 8;
|
||||
return;
|
||||
}
|
||||
if (apiObj is PaymentError_PersistError) {
|
||||
if (apiObj is PaymentError_PaymentTimeout) {
|
||||
wireObj.tag = 9;
|
||||
return;
|
||||
}
|
||||
if (apiObj is PaymentError_PersistError) {
|
||||
wireObj.tag = 10;
|
||||
return;
|
||||
}
|
||||
if (apiObj is PaymentError_Refunded) {
|
||||
var pre_err = cst_encode_String(apiObj.err);
|
||||
var pre_refund_tx_id = cst_encode_String(apiObj.refundTxId);
|
||||
wireObj.tag = 10;
|
||||
wireObj.tag = 11;
|
||||
wireObj.kind.Refunded.err = pre_err;
|
||||
wireObj.kind.Refunded.refund_tx_id = pre_refund_tx_id;
|
||||
return;
|
||||
}
|
||||
if (apiObj is PaymentError_SendError) {
|
||||
var pre_err = cst_encode_String(apiObj.err);
|
||||
wireObj.tag = 11;
|
||||
wireObj.tag = 12;
|
||||
wireObj.kind.SendError.err = pre_err;
|
||||
return;
|
||||
}
|
||||
if (apiObj is PaymentError_SignerError) {
|
||||
var pre_err = cst_encode_String(apiObj.err);
|
||||
wireObj.tag = 12;
|
||||
wireObj.tag = 13;
|
||||
wireObj.kind.SignerError.err = pre_err;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user