mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-04 12:34:14 +01:00
SP Enhancments (#1483)
* fixes and minor enhancements for SP flow * fix build * change dfx text * minor fixes * pass use electrs to setListeners * comment out connecting on failure for now
This commit is contained in:
@@ -306,7 +306,7 @@ class CWBitcoin extends Bitcoin {
|
||||
}
|
||||
|
||||
final electrumClient = ElectrumClient();
|
||||
await electrumClient.connectToUri(node.uri);
|
||||
await electrumClient.connectToUri(node.uri, useSSL: node.useSSL);
|
||||
|
||||
late BasedUtxoNetwork network;
|
||||
btc.NetworkType networkType;
|
||||
@@ -560,10 +560,16 @@ class CWBitcoin extends Bitcoin {
|
||||
}
|
||||
|
||||
final bitcoinWallet = wallet as ElectrumWallet;
|
||||
final tweaksResponse = await bitcoinWallet.electrumClient.getTweaks(height: 0);
|
||||
try {
|
||||
final tweaksResponse = await bitcoinWallet.electrumClient.getTweaks(height: 0);
|
||||
|
||||
if (tweaksResponse != null) {
|
||||
return true;
|
||||
if (tweaksResponse != null) {
|
||||
return true;
|
||||
}
|
||||
} on RequestFailedTimeoutException {
|
||||
return false;
|
||||
} catch (_) {
|
||||
rethrow;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -136,9 +136,11 @@ class RootState extends State<Root> with WidgetsBindingObserver {
|
||||
break;
|
||||
case AppLifecycleState.resumed:
|
||||
widget.authService.requireAuth().then((value) {
|
||||
setState(() {
|
||||
_requestAuth = value;
|
||||
});
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_requestAuth = value;
|
||||
});
|
||||
}
|
||||
});
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -118,25 +118,27 @@ class ExceptionHandler {
|
||||
|
||||
WidgetsBinding.instance.addPostFrameCallback(
|
||||
(timeStamp) async {
|
||||
await showPopUp<void>(
|
||||
context: navigatorKey.currentContext!,
|
||||
builder: (context) {
|
||||
return AlertWithTwoActions(
|
||||
isDividerExist: true,
|
||||
alertTitle: S.of(context).error,
|
||||
alertContent: S.of(context).error_dialog_content,
|
||||
rightButtonText: S.of(context).send,
|
||||
leftButtonText: S.of(context).do_not_send,
|
||||
actionRightButton: () {
|
||||
Navigator.of(context).pop();
|
||||
_sendExceptionFile();
|
||||
},
|
||||
actionLeftButton: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
if (navigatorKey.currentContext != null) {
|
||||
await showPopUp<void>(
|
||||
context: navigatorKey.currentContext!,
|
||||
builder: (context) {
|
||||
return AlertWithTwoActions(
|
||||
isDividerExist: true,
|
||||
alertTitle: S.of(context).error,
|
||||
alertContent: S.of(context).error_dialog_content,
|
||||
rightButtonText: S.of(context).send,
|
||||
leftButtonText: S.of(context).do_not_send,
|
||||
actionRightButton: () {
|
||||
Navigator.of(context).pop();
|
||||
_sendExceptionFile();
|
||||
},
|
||||
actionLeftButton: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
_hasError = false;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user