public async Task <string> SendTransactionAsync(Transaction tx) { var clients = this.Clients.Values.Where(x => string.IsNullOrEmpty(x.Wallet.Options.RpcServerAddress) == false); if (clients.Count() > 0) { var sendTransactionTasks = clients .Select(x => Wallet.Wallet.SendTransactionAsync(tx, TransactionOptions.NewFrom(x.Wallet.Options))); return(await await Task.WhenAny(sendTransactionTasks)); } return(await Wallet.Wallet.SendTransactionAsync(tx, TransactionOptions.NewFrom(this.options))); }
public string SendTransactionAsync(NknSdk.Common.Protobuf.Transaction.Transaction tx) { if (string.IsNullOrWhiteSpace(this.Wallet.Options.RpcServerAddress)) { try { return(NknSdk.Wallet.Wallet.SendTransactionAsync(tx, TransactionOptions.NewFrom(this.Wallet.Options))); } catch (Exception) { } } return(NknSdk.Wallet.Wallet.SendTransactionAsync(tx, TransactionOptions.NewFrom(this.options))); }
public Task <string> SendTransactionAsync(Transaction tx) => Wallet.SendTransactionAsync(tx, TransactionOptions.NewFrom(this.Options));