From 471a2af527e97d258f5c7c3faca9ac5522a984ad Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Fri, 3 Jan 2025 13:49:15 +0200 Subject: [PATCH] minor fixes [skip ci] --- lib/buy/robinhood/robinhood_buy_provider.dart | 9 +++++---- lib/utils/exception_handler.dart | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/buy/robinhood/robinhood_buy_provider.dart b/lib/buy/robinhood/robinhood_buy_provider.dart index 271b9c090..937af0315 100644 --- a/lib/buy/robinhood/robinhood_buy_provider.dart +++ b/lib/buy/robinhood/robinhood_buy_provider.dart @@ -51,6 +51,8 @@ class RobinhoodBuyProvider extends BuyProvider { switch (wallet.type) { case WalletType.ethereum: case WalletType.polygon: + case WalletType.solana: + case WalletType.tron: return await wallet.signMessage(message); case WalletType.litecoin: case WalletType.bitcoin: @@ -78,8 +80,7 @@ class RobinhoodBuyProvider extends BuyProvider { if (response.statusCode == 200) { return (jsonDecode(response.body) as Map)['connectId'] as String; } else { - throw Exception( - 'Provider currently unavailable. Status: ${response.statusCode} ${response.body}'); + throw Exception('Provider currently unavailable. Status: ${response.statusCode}'); } } @@ -120,13 +121,13 @@ class RobinhoodBuyProvider extends BuyProvider { try { final uri = await requestProviderUrl(); await launchUrl(uri, mode: LaunchMode.externalApplication); - } catch (_) { + } catch (e) { await showPopUp( context: context, builder: (BuildContext context) { return AlertWithOneAction( alertTitle: "Robinhood Connect", - alertContent: S.of(context).buy_provider_unavailable, + alertContent: e.toString(), buttonText: S.of(context).ok, buttonAction: () => Navigator.of(context).pop()); }); diff --git a/lib/utils/exception_handler.dart b/lib/utils/exception_handler.dart index 66cbc61a0..b949c9968 100644 --- a/lib/utils/exception_handler.dart +++ b/lib/utils/exception_handler.dart @@ -215,6 +215,7 @@ class ExceptionHandler { "input stream error", "invalid signature", "invalid password", + "NetworkImage._loadAsync", // Temporary ignored, More context: Flutter secure storage reads the values as null some times // probably when the device was locked and then opened on Cake // this is solved by a restart of the app