mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
trusted nodes fix and possibly other node fix
This commit is contained in:
parent
017719971b
commit
a391a76eec
2 changed files with 48 additions and 8 deletions
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue