private async Task ConnectToBlockchain(BlockchainDetails blockchain) { if (MultiChainVm.Connected) { if (MultiChainVm.Model.Name != blockchain.ChainString) { await MultiChainVm.Disconnect(); } else { return; } } await MultiChainVm.Connect(blockchain.Host, blockchain.Port, blockchain.ChainString); }
private async Task ConnectToBlockchain(BlockchainDetails blockchain) { if (MultiChainVm.Connected) { if (MultiChainVm.Model.Name != blockchain.ChainString) { await MultiChainVm.Disconnect(); } else { return; } } await MultiChainVm.Connect(blockchain.Host, blockchain.Port, blockchain.ChainString); // Ensure our questions have been loaded. Connection may be slow await MultiChainVm.Model.WaitUntilBlockchainSynced(3, new Progress <BlockchainSyncProgress>()); }