File tree 1 file changed +5
-3
lines changed 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -265,8 +265,10 @@ impl<'a> bip21::de::DeserializationState<'a> for DeserializationState {
265
265
"lno" => {
266
266
let bolt12_value =
267
267
String :: try_from ( value) . map_err ( |_| Error :: UriParameterParsingFailed ) ?;
268
- let offer =
269
- bolt12_value. parse :: < Offer > ( ) . map_err ( |_| Error :: UriParameterParsingFailed ) ?;
268
+ let offer = bolt12_value
269
+ . to_lowercase ( )
270
+ . parse :: < Offer > ( )
271
+ . map_err ( |_| Error :: UriParameterParsingFailed ) ?;
270
272
self . bolt12_offer = Some ( offer) ;
271
273
Ok ( bip21:: de:: ParamKind :: Known )
272
274
} ,
@@ -342,7 +344,7 @@ mod tests {
342
344
}
343
345
344
346
if let Some ( offer) = parsed_uri_with_offer. extras . bolt12_offer {
345
- assert_eq ! ( offer, Offer :: from_str( expected_bolt12_offer_2) . unwrap( ) ) ;
347
+ assert_eq ! ( offer, Offer :: from_str( & expected_bolt12_offer_2. to_lowercase ( ) ) . unwrap( ) ) ;
346
348
} else {
347
349
panic ! ( "No offer found." ) ;
348
350
}
You can’t perform that action at this time.
0 commit comments