Skip to content

Commit ff6d9ce

Browse files
committed
test(send): align LNAddress parsing expectation
1 parent 8b9f2c2 commit ff6d9ce

1 file changed

Lines changed: 9 additions & 14 deletions

File tree

integration_test/payment_request_test.dart

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,15 @@ Future<void> main({bool isInitialized = false}) async {
4646
expect(bip21.network, Network.bitcoinMainnet);
4747
});
4848

49-
test(
50-
'HTTPS URL with percent-encoded LNAddress in lightning param',
51-
() async {
52-
const input =
53-
'https://admin.bullbitcoin.com/abc'
54-
'?lightning=ishi%40walletofsatoshi.com&label=pleasefundme';
55-
final result = await PaymentRequest.parse(input);
56-
expect(result, isA<LnAddressPaymentRequest>());
57-
expect(
58-
(result as LnAddressPaymentRequest).address,
59-
'ishi@walletofsatoshi.com',
60-
);
61-
},
62-
);
49+
test('HTTPS URL with a percent-encoded LNAddress is rejected', () async {
50+
const input =
51+
'https://admin.bullbitcoin.com/abc'
52+
'?lightning=ishi%40walletofsatoshi.com&label=pleasefundme';
53+
expect(
54+
() => PaymentRequest.parse(input),
55+
throwsA('Invalid payment request'),
56+
);
57+
});
6358
});
6459

6560
group('Liquid address confidentiality (security audit)', () {

0 commit comments

Comments
 (0)