@@ -85,6 +85,11 @@ pub struct CreateOrderRequest {
85
85
/// The order made.
86
86
#[ serde( flatten) ]
87
87
pub order : OrderParameters ,
88
+ /// The address where the LSP will send the funds if the order fails.
89
+ #[ serde( default ) ]
90
+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
91
+ #[ serde( with = "unchecked_address_option" ) ]
92
+ pub refund_onchain_address : Option < Address > ,
88
93
}
89
94
90
95
/// An object representing an LSPS1 channel order.
@@ -107,11 +112,6 @@ pub struct OrderParameters {
107
112
pub channel_expiry_blocks : u32 ,
108
113
/// May contain arbitrary associated data like a coupon code or a authentication token.
109
114
pub token : Option < String > ,
110
- /// The address where the LSP will send the funds if the order fails.
111
- #[ serde( default ) ]
112
- #[ serde( skip_serializing_if = "Option::is_none" ) ]
113
- #[ serde( with = "unchecked_address_option" ) ]
114
- pub refund_onchain_address : Option < Address > ,
115
115
/// Indicates if the channel should be announced to the network.
116
116
pub announce_channel : bool ,
117
117
}
@@ -196,6 +196,11 @@ pub struct OnchainPaymentInfo {
196
196
/// confirmed without a confirmation.
197
197
#[ serde( with = "u32_fee_rate" ) ]
198
198
pub min_fee_for_0conf : FeeRate ,
199
+ /// The address where the LSP will send the funds if the order fails.
200
+ #[ serde( default ) ]
201
+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
202
+ #[ serde( with = "unchecked_address_option" ) ]
203
+ pub refund_onchain_address : Option < Address > ,
199
204
}
200
205
201
206
/// The state of a payment.
@@ -435,9 +440,10 @@ mod tests {
435
440
"expires_at": "2015-01-25T19:29:44.612Z",
436
441
"fee_total_sat": "9999",
437
442
"order_total_sat": "2009999",
438
- "address": "bc1qvmsy0f3yyes6z9jvddk8xqwznndmdwapvrc0xrmhd3vqj5rhdrrq6hz49h ",
443
+ "address" : "bc1p5uvtaxzkjwvey2tfy49k5vtqfpjmrgm09cvs88ezyy8h2zv7jhas9tu4yr ",
439
444
"min_fee_for_0conf": 253,
440
- "min_onchain_payment_confirmations": 0
445
+ "min_onchain_payment_confirmations": 0,
446
+ "refund_onchain_address": "bc1qvmsy0f3yyes6z9jvddk8xqwznndmdwapvrc0xrmhd3vqj5rhdrrq6hz49h"
441
447
}
442
448
},
443
449
"channel": null
0 commit comments