mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-24 12:29:37 +00:00
pass trusted to connectToNode
This commit is contained in:
parent
1e4a39a92c
commit
227dd61be2
1 changed files with 16 additions and 4 deletions
|
@ -398,7 +398,10 @@ class MoneroWallet extends CoinServiceAPI {
|
||||||
final node = await _getCurrentNode();
|
final node = await _getCurrentNode();
|
||||||
final host = Uri.parse(node.host).host;
|
final host = Uri.parse(node.host).host;
|
||||||
await walletBase!.connectToNode(
|
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 walletBase!.startSync();
|
||||||
await DB.instance
|
await DB.instance
|
||||||
.put<dynamic>(boxName: walletId, key: "id", value: _walletId);
|
.put<dynamic>(boxName: walletId, key: "id", value: _walletId);
|
||||||
|
@ -666,7 +669,10 @@ class MoneroWallet extends CoinServiceAPI {
|
||||||
final node = await _getCurrentNode();
|
final node = await _getCurrentNode();
|
||||||
final host = Uri.parse(node.host).host;
|
final host = Uri.parse(node.host).host;
|
||||||
await walletBase!.connectToNode(
|
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);
|
await walletBase!.rescan(height: credentials.height);
|
||||||
walletBase!.close();
|
walletBase!.close();
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
|
@ -775,7 +781,10 @@ class MoneroWallet extends CoinServiceAPI {
|
||||||
final node = await _getCurrentNode();
|
final node = await _getCurrentNode();
|
||||||
final host = Uri.parse(node.host).host;
|
final host = Uri.parse(node.host).host;
|
||||||
await walletBase?.connectToNode(
|
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 walletBase?.startSync();
|
||||||
await refresh();
|
await refresh();
|
||||||
|
@ -851,7 +860,10 @@ class MoneroWallet extends CoinServiceAPI {
|
||||||
|
|
||||||
final host = Uri.parse(node.host).host;
|
final host = Uri.parse(node.host).host;
|
||||||
await walletBase?.connectToNode(
|
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?
|
// TODO: is this sync call needed? Do we need to notify ui here?
|
||||||
await walletBase?.startSync();
|
await walletBase?.startSync();
|
||||||
|
|
Loading…
Reference in a new issue