@@ -877,13 +877,12 @@ impl VerifiedInvoiceRequest {
877
877
let InvoiceRequestContents {
878
878
payer_id,
879
879
inner : InvoiceRequestContentsWithoutPayerId {
880
- payer : _, offer : _, chain, amount_msats, features, quantity, payer_note
880
+ payer : _, offer : _, chain : _ , amount_msats, features, quantity, payer_note
881
881
} ,
882
882
} = & self . inner . contents ;
883
883
884
884
InvoiceRequestFields {
885
885
payer_id : * payer_id,
886
- chain : * chain,
887
886
amount_msats : * amount_msats,
888
887
features : features. clone ( ) ,
889
888
quantity : * quantity,
@@ -1127,9 +1126,6 @@ pub struct InvoiceRequestFields {
1127
1126
/// A possibly transient pubkey used to sign the invoice request.
1128
1127
pub payer_id : PublicKey ,
1129
1128
1130
- /// A chain from [`Offer::chains`] that the offer is valid for.
1131
- pub chain : Option < ChainHash > ,
1132
-
1133
1129
/// The amount to pay in msats (i.e., the minimum lightning-payable unit for [`chain`]), which
1134
1130
/// must be greater than or equal to [`Offer::amount`], converted if necessary.
1135
1131
///
@@ -1154,11 +1150,10 @@ impl Writeable for InvoiceRequestFields {
1154
1150
fn write < W : Writer > ( & self , writer : & mut W ) -> Result < ( ) , io:: Error > {
1155
1151
write_tlv_fields ! ( writer, {
1156
1152
( 0 , self . payer_id, required) ,
1157
- ( 2 , self . chain, option) ,
1158
- ( 4 , self . amount_msats, option) ,
1159
- ( 6 , WithoutLength ( & self . features) , required) ,
1160
- ( 8 , self . quantity, option) ,
1161
- ( 10 , self . payer_note_truncated, option) ,
1153
+ ( 2 , self . amount_msats, option) ,
1154
+ ( 4 , WithoutLength ( & self . features) , required) ,
1155
+ ( 6 , self . quantity, option) ,
1156
+ ( 8 , self . payer_note_truncated, option) ,
1162
1157
} ) ;
1163
1158
Ok ( ( ) )
1164
1159
}
@@ -1168,17 +1163,15 @@ impl Readable for InvoiceRequestFields {
1168
1163
fn read < R : io:: Read > ( reader : & mut R ) -> Result < Self , DecodeError > {
1169
1164
_init_and_read_len_prefixed_tlv_fields ! ( reader, {
1170
1165
( 0 , payer_id, required) ,
1171
- ( 2 , chain, option) ,
1172
- ( 4 , amount_msats, option) ,
1173
- ( 6 , features, ( option, encoding: ( InvoiceRequestFeatures , WithoutLength ) ) ) ,
1174
- ( 8 , quantity, option) ,
1175
- ( 10 , payer_note_truncated, option) ,
1166
+ ( 2 , amount_msats, option) ,
1167
+ ( 4 , features, ( option, encoding: ( InvoiceRequestFeatures , WithoutLength ) ) ) ,
1168
+ ( 6 , quantity, option) ,
1169
+ ( 8 , payer_note_truncated, option) ,
1176
1170
} ) ;
1177
1171
let features = features. unwrap_or ( InvoiceRequestFeatures :: empty ( ) ) ;
1178
1172
1179
1173
Ok ( InvoiceRequestFields {
1180
- payer_id : payer_id. 0 . unwrap ( ) , chain, amount_msats, features, quantity,
1181
- payer_note_truncated,
1174
+ payer_id : payer_id. 0 . unwrap ( ) , amount_msats, features, quantity, payer_note_truncated,
1182
1175
} )
1183
1176
}
1184
1177
}
@@ -2282,7 +2275,6 @@ mod tests {
2282
2275
invoice_request. fields( ) ,
2283
2276
InvoiceRequestFields {
2284
2277
payer_id: payer_pubkey( ) ,
2285
- chain: Some ( ChainHash :: using_genesis_block( Network :: Testnet ) ) ,
2286
2278
amount_msats: Some ( 1001 ) ,
2287
2279
features: InvoiceRequestFeatures :: empty( ) ,
2288
2280
quantity: Some ( 1 ) ,
0 commit comments