@@ -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
- features : features. clone ( ) ,
887
886
quantity : * quantity,
888
887
payer_note_truncated : payer_note. clone ( )
889
888
. map ( |mut s| { s. truncate ( PAYER_NOTE_LIMIT ) ; UntrustedString ( s) } ) ,
@@ -1125,9 +1124,6 @@ pub struct InvoiceRequestFields {
1125
1124
/// A possibly transient pubkey used to sign the invoice request.
1126
1125
pub payer_id : PublicKey ,
1127
1126
1128
- /// Features pertaining to requesting an invoice.
1129
- pub features : InvoiceRequestFeatures ,
1130
-
1131
1127
/// The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].
1132
1128
pub quantity : Option < u64 > ,
1133
1129
@@ -1143,9 +1139,8 @@ impl Writeable for InvoiceRequestFields {
1143
1139
fn write < W : Writer > ( & self , writer : & mut W ) -> Result < ( ) , io:: Error > {
1144
1140
write_tlv_fields ! ( writer, {
1145
1141
( 0 , self . payer_id, required) ,
1146
- ( 2 , WithoutLength ( & self . features) , required) ,
1147
- ( 4 , self . quantity. map( |v| HighZeroBytesDroppedBigSize ( v) ) , option) ,
1148
- ( 6 , self . payer_note_truncated. as_ref( ) . map( |s| WithoutLength ( & s. 0 ) ) , option) ,
1142
+ ( 2 , self . quantity. map( |v| HighZeroBytesDroppedBigSize ( v) ) , option) ,
1143
+ ( 4 , self . payer_note_truncated. as_ref( ) . map( |s| WithoutLength ( & s. 0 ) ) , option) ,
1149
1144
} ) ;
1150
1145
Ok ( ( ) )
1151
1146
}
@@ -1155,14 +1150,13 @@ impl Readable for InvoiceRequestFields {
1155
1150
fn read < R : io:: Read > ( reader : & mut R ) -> Result < Self , DecodeError > {
1156
1151
_init_and_read_len_prefixed_tlv_fields ! ( reader, {
1157
1152
( 0 , payer_id, required) ,
1158
- ( 2 , features, ( option, encoding: ( InvoiceRequestFeatures , WithoutLength ) ) ) ,
1159
- ( 4 , quantity, ( option, encoding: ( u64 , HighZeroBytesDroppedBigSize ) ) ) ,
1160
- ( 6 , payer_note_truncated, ( option, encoding: ( String , WithoutLength ) ) ) ,
1153
+ ( 2 , quantity, ( option, encoding: ( u64 , HighZeroBytesDroppedBigSize ) ) ) ,
1154
+ ( 4 , payer_note_truncated, ( option, encoding: ( String , WithoutLength ) ) ) ,
1161
1155
} ) ;
1162
- let features = features. unwrap_or ( InvoiceRequestFeatures :: empty ( ) ) ;
1163
1156
1164
1157
Ok ( InvoiceRequestFields {
1165
- payer_id : payer_id. 0 . unwrap ( ) , features, quantity,
1158
+ payer_id : payer_id. 0 . unwrap ( ) ,
1159
+ quantity,
1166
1160
payer_note_truncated : payer_note_truncated. map ( |s| UntrustedString ( s) ) ,
1167
1161
} )
1168
1162
}
@@ -2267,7 +2261,6 @@ mod tests {
2267
2261
fields,
2268
2262
InvoiceRequestFields {
2269
2263
payer_id: payer_pubkey( ) ,
2270
- features: InvoiceRequestFeatures :: empty( ) ,
2271
2264
quantity: Some ( 1 ) ,
2272
2265
payer_note_truncated: Some ( UntrustedString ( "0" . repeat( PAYER_NOTE_LIMIT ) ) ) ,
2273
2266
}
0 commit comments