minor fix

This commit is contained in:
Matthew Fosse 2024-02-29 13:27:07 -08:00
parent 72a2e48e1a
commit 81cf08a0ad

View file

@ -226,7 +226,13 @@ class LightningSendPage extends BasePage {
final sdk = await BreezSDK(); final sdk = await BreezSDK();
final InputType inputType = await sdk.parseInput(input: bolt11Controller.text); late InputType inputType;
try {
inputType = await sdk.parseInput(input: bolt11Controller.text);
} catch (_) {
throw Exception("Unknown input type");
}
if (inputType is InputType_Bolt11) { if (inputType is InputType_Bolt11) {
final bolt11 = await sdk.parseInvoice(bolt11Controller.text); final bolt11 = await sdk.parseInvoice(bolt11Controller.text);