diff --git a/lib/services/coins/monero/monero_wallet.dart b/lib/services/coins/monero/monero_wallet.dart index 61ea7c8d1..ee3807163 100644 --- a/lib/services/coins/monero/monero_wallet.dart +++ b/lib/services/coins/monero/monero_wallet.dart @@ -381,7 +381,12 @@ class MoneroWallet extends CoinServiceAPI with WalletCache, WalletDB { final node = await _getCurrentNode(); final host = Uri.parse(node.host).host; await walletBase!.connectToNode( - node: Node(uri: "$host:${node.port}", type: WalletType.monero)); + node: Node( + uri: "$host:${node.port}", + type: WalletType.monero, + trusted: node.trusted ?? false, + ), + ); await walletBase!.startSync(); await Future.wait([ @@ -603,7 +608,12 @@ class MoneroWallet extends CoinServiceAPI with WalletCache, WalletDB { final node = await _getCurrentNode(); final host = Uri.parse(node.host).host; await walletBase!.connectToNode( - node: Node(uri: "$host:${node.port}", type: WalletType.monero)); + node: Node( + uri: "$host:${node.port}", + type: WalletType.monero, + trusted: node.trusted ?? false, + ), + ); await walletBase!.rescan(height: credentials.height); walletBase!.close(); } catch (e, s) { @@ -690,7 +700,12 @@ class MoneroWallet extends CoinServiceAPI with WalletCache, WalletDB { final node = await _getCurrentNode(); final host = Uri.parse(node.host).host; await walletBase?.connectToNode( - node: Node(uri: "$host:${node.port}", type: WalletType.monero)); + node: Node( + uri: "$host:${node.port}", + type: WalletType.monero, + trusted: node.trusted ?? false, + ), + ); } await walletBase?.startSync(); await refresh(); @@ -782,7 +797,12 @@ class MoneroWallet extends CoinServiceAPI with WalletCache, WalletDB { final host = Uri.parse(node.host).host; await walletBase?.connectToNode( - node: Node(uri: "$host:${node.port}", type: WalletType.monero)); + node: Node( + uri: "$host:${node.port}", + type: WalletType.monero, + trusted: node.trusted ?? false, + ), + ); // TODO: is this sync call needed? Do we need to notify ui here? await walletBase?.startSync(); diff --git a/lib/services/coins/wownero/wownero_wallet.dart b/lib/services/coins/wownero/wownero_wallet.dart index 81b7e2fa1..d471208cd 100644 --- a/lib/services/coins/wownero/wownero_wallet.dart +++ b/lib/services/coins/wownero/wownero_wallet.dart @@ -389,7 +389,12 @@ class WowneroWallet extends CoinServiceAPI with WalletCache, WalletDB { final node = await _getCurrentNode(); final host = Uri.parse(node.host).host; await walletBase?.connectToNode( - node: Node(uri: "$host:${node.port}", type: WalletType.wownero)); + node: Node( + uri: "$host:${node.port}", + type: WalletType.wownero, + trusted: node.trusted ?? false, + ), + ); await walletBase?.startSync(); await Future.wait([ updateCachedId(walletId), @@ -614,7 +619,12 @@ class WowneroWallet extends CoinServiceAPI with WalletCache, WalletDB { final node = await _getCurrentNode(); final host = Uri.parse(node.host).host; await walletBase?.connectToNode( - node: Node(uri: "$host:${node.port}", type: WalletType.wownero)); + node: Node( + uri: "$host:${node.port}", + type: WalletType.wownero, + trusted: node.trusted ?? false, + ), + ); await walletBase?.rescan(height: credentials.height); walletBase?.close(); } catch (e, s) { @@ -701,7 +711,12 @@ class WowneroWallet extends CoinServiceAPI with WalletCache, WalletDB { final node = await _getCurrentNode(); final host = Uri.parse(node.host).host; await walletBase?.connectToNode( - node: Node(uri: "$host:${node.port}", type: WalletType.monero)); + node: Node( + uri: "$host:${node.port}", + type: WalletType.wownero, + trusted: node.trusted ?? false, + ), + ); } await walletBase?.startSync(); await refresh(); @@ -790,7 +805,12 @@ class WowneroWallet extends CoinServiceAPI with WalletCache, WalletDB { final host = Uri.parse(node.host).host; await walletBase?.connectToNode( - node: Node(uri: "$host:${node.port}", type: WalletType.monero)); + node: Node( + uri: "$host:${node.port}", + type: WalletType.wownero, + trusted: node.trusted ?? false, + ), + ); // TODO: is this sync call needed? Do we need to notify ui here? await walletBase?.startSync();