mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-16 17:27:39 +00:00
fix wow connection
This commit is contained in:
parent
1936118f2c
commit
5eb276b6fc
5 changed files with 31 additions and 17 deletions
|
@ -29,6 +29,7 @@ import '../../../../utilities/text_styles.dart';
|
|||
import '../../../../utilities/util.dart';
|
||||
import '../../../../wallets/crypto_currency/crypto_currency.dart';
|
||||
import '../../../../wallets/crypto_currency/intermediate/cryptonote_currency.dart';
|
||||
import '../../../../wallets/wallet/wallet_mixin_interfaces/cw_based_interface.dart';
|
||||
import '../../../../widgets/background.dart';
|
||||
import '../../../../widgets/conditional_parent.dart';
|
||||
import '../../../../widgets/custom_buttons/app_bar_icon_button.dart';
|
||||
|
@ -221,7 +222,7 @@ class _AddEditNodeViewState extends ConsumerState<AddEditNodeView> {
|
|||
|
||||
// strip unused path
|
||||
String address = formData.host!;
|
||||
if (coin is Monero || coin is Wownero) {
|
||||
if (coin is CwBasedInterface) {
|
||||
if (address.startsWith("http")) {
|
||||
final uri = Uri.parse(address);
|
||||
address = "${uri.scheme}://${uri.host}";
|
||||
|
@ -332,7 +333,7 @@ class _AddEditNodeViewState extends ConsumerState<AddEditNodeView> {
|
|||
FocusScope.of(context).unfocus();
|
||||
await Future<void>.delayed(const Duration(milliseconds: 75));
|
||||
}
|
||||
if (mounted) {
|
||||
if (context.mounted) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
},
|
||||
|
@ -836,6 +837,14 @@ class _NodeFormState extends ConsumerState<NodeForm> {
|
|||
} else {
|
||||
enableSSLCheckbox = true;
|
||||
}
|
||||
} else if (widget.coin is CwBasedInterface) {
|
||||
if (newValue.startsWith("https://")) {
|
||||
_useSSL = true;
|
||||
} else if (newValue.startsWith("http://")) {
|
||||
_useSSL = false;
|
||||
} else {
|
||||
_useSSL = true;
|
||||
}
|
||||
}
|
||||
_updateState();
|
||||
setState(() {});
|
||||
|
@ -1043,7 +1052,7 @@ class _NodeFormState extends ConsumerState<NodeForm> {
|
|||
),
|
||||
],
|
||||
),
|
||||
if (widget.coin is Monero || widget.coin is Wownero)
|
||||
if (widget.coin is CwBasedInterface)
|
||||
Row(
|
||||
children: [
|
||||
GestureDetector(
|
||||
|
|
|
@ -12,11 +12,12 @@ import 'dart:convert';
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'format.dart';
|
||||
import 'logger.dart';
|
||||
|
||||
import '../widgets/desktop/primary_button.dart';
|
||||
import '../widgets/desktop/secondary_button.dart';
|
||||
import '../widgets/stack_dialog.dart';
|
||||
import 'format.dart';
|
||||
import 'logger.dart';
|
||||
|
||||
class MoneroNodeConnectionResponse {
|
||||
final X509Certificate? cert;
|
||||
|
|
|
@ -201,6 +201,7 @@ class MoneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
uri: "$host:${node.port}",
|
||||
type: WalletType.monero,
|
||||
trusted: node.trusted ?? false,
|
||||
useSSL: node.useSSL,
|
||||
),
|
||||
socksProxyAddress:
|
||||
proxy == null ? null : "${proxy.host.address}:${proxy.port}",
|
||||
|
@ -212,6 +213,7 @@ class MoneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
uri: "$host:${node.port}",
|
||||
type: WalletType.monero,
|
||||
trusted: node.trusted ?? false,
|
||||
useSSL: node.useSSL,
|
||||
),
|
||||
socksProxyAddress:
|
||||
proxy == null ? null : "${proxy.host.address}:${proxy.port}",
|
||||
|
|
|
@ -190,6 +190,7 @@ class WowneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
uri: "$host:${node.port}",
|
||||
type: WalletType.wownero,
|
||||
trusted: node.trusted ?? false,
|
||||
useSSL: node.useSSL,
|
||||
),
|
||||
socksProxyAddress:
|
||||
proxy == null ? null : "${proxy.host.address}:${proxy.port}",
|
||||
|
@ -201,6 +202,7 @@ class WowneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
uri: "$host:${node.port}",
|
||||
type: WalletType.wownero,
|
||||
trusted: node.trusted ?? false,
|
||||
useSSL: node.useSSL,
|
||||
),
|
||||
socksProxyAddress:
|
||||
proxy == null ? null : "${proxy.host.address}:${proxy.port}",
|
||||
|
|
24
pubspec.lock
24
pubspec.lock
|
@ -346,10 +346,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: cross_file
|
||||
sha256: fd832b5384d0d6da4f6df60b854d33accaaeb63aa9e10e736a87381f08dee2cb
|
||||
sha256: "55d7b444feb71301ef6b8838dbc1ae02e63dd48c8773f3810ff53bb1e2945b32"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.3.3+5"
|
||||
version: "0.3.4+1"
|
||||
crypto:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -616,11 +616,11 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
path: "."
|
||||
ref: f0930d9fa79d347b2a0e25a7de4f5a4a88a9a907
|
||||
resolved-ref: f0930d9fa79d347b2a0e25a7de4f5a4a88a9a907
|
||||
url: "https://github.com/muttsu-623/flutter_file_picker.git"
|
||||
ref: "9abc0930081c9859884e073bd25ab88b2114d9e7"
|
||||
resolved-ref: "9abc0930081c9859884e073bd25ab88b2114d9e7"
|
||||
url: "https://github.com/cypherstack/flutter_file_picker.git"
|
||||
source: git
|
||||
version: "5.3.3"
|
||||
version: "8.0.3"
|
||||
fixnum:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -746,10 +746,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: flutter_plugin_android_lifecycle
|
||||
sha256: f185ac890306b5779ecbd611f52502d8d4d63d27703ef73161ca0407e815f02c
|
||||
sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.16"
|
||||
version: "2.0.19"
|
||||
flutter_riverpod:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -1390,10 +1390,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: plugin_platform_interface
|
||||
sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d
|
||||
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.6"
|
||||
version: "2.1.8"
|
||||
pointycastle:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -2049,10 +2049,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: win32
|
||||
sha256: c97defd418eef4ec88c0d1652cdce84b9f7b63dd7198e266d06ac1710d527067
|
||||
sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.0.8"
|
||||
version: "5.2.0"
|
||||
win32_registry:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
Loading…
Reference in a new issue