@@ -877,13 +877,12 @@ impl VerifiedInvoiceRequest {
877877 let InvoiceRequestContents {
878878 payer_id,
879879 inner : InvoiceRequestContentsWithoutPayerId {
880- payer : _, offer : _, chain, amount_msats, features, quantity, payer_note
880+ payer : _, offer : _, chain : _ , amount_msats, features, quantity, payer_note
881881 } ,
882882 } = & self . inner . contents ;
883883
884884 InvoiceRequestFields {
885885 payer_id : * payer_id,
886- chain : * chain,
887886 amount_msats : * amount_msats,
888887 features : features. clone ( ) ,
889888 quantity : * quantity,
@@ -1127,9 +1126,6 @@ pub struct InvoiceRequestFields {
11271126 /// A possibly transient pubkey used to sign the invoice request.
11281127 pub payer_id : PublicKey ,
11291128
1130- /// A chain from [`Offer::chains`] that the offer is valid for.
1131- pub chain : Option < ChainHash > ,
1132-
11331129 /// The amount to pay in msats (i.e., the minimum lightning-payable unit for [`chain`]), which
11341130 /// must be greater than or equal to [`Offer::amount`], converted if necessary.
11351131 ///
@@ -1154,11 +1150,10 @@ impl Writeable for InvoiceRequestFields {
11541150 fn write < W : Writer > ( & self , writer : & mut W ) -> Result < ( ) , io:: Error > {
11551151 write_tlv_fields ! ( writer, {
11561152 ( 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) ,
11621157 } ) ;
11631158 Ok ( ( ) )
11641159 }
@@ -1168,17 +1163,15 @@ impl Readable for InvoiceRequestFields {
11681163 fn read < R : io:: Read > ( reader : & mut R ) -> Result < Self , DecodeError > {
11691164 _init_and_read_len_prefixed_tlv_fields ! ( reader, {
11701165 ( 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) ,
11761170 } ) ;
11771171 let features = features. unwrap_or ( InvoiceRequestFeatures :: empty ( ) ) ;
11781172
11791173 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,
11821175 } )
11831176 }
11841177}
@@ -2282,7 +2275,6 @@ mod tests {
22822275 invoice_request. fields( ) ,
22832276 InvoiceRequestFields {
22842277 payer_id: payer_pubkey( ) ,
2285- chain: Some ( ChainHash :: using_genesis_block( Network :: Testnet ) ) ,
22862278 amount_msats: Some ( 1001 ) ,
22872279 features: InvoiceRequestFeatures :: empty( ) ,
22882280 quantity: Some ( 1 ) ,
0 commit comments