mirror of
https://github.com/logos-storage/logos-storage-nim-cs-dist-tests.git
synced 2026-01-03 22:13:10 +00:00
Fixes check for eth address files
This commit is contained in:
parent
accbe51392
commit
7167252e8b
@ -62,7 +62,6 @@ namespace NethereumWorkflow
|
||||
log.Debug(typeof(TFunction).ToString());
|
||||
var handler = web3.Eth.GetContractQueryHandler<TFunction>();
|
||||
var result = Time.Wait(handler.QueryRawAsync(contractAddress, function, new BlockParameter(blockNumber)));
|
||||
var aaaa = 0;
|
||||
}
|
||||
|
||||
public string SendTransaction<TFunction>(string contractAddress, TFunction function) where TFunction : FunctionMessage, new()
|
||||
|
||||
@ -25,10 +25,9 @@ namespace AutoClient.Modes.FolderStore
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(app.Config.EthAddressFile)) return Array.Empty<EthAddress>();
|
||||
if (!File.Exists(app.Config.EthAddressFile)) return Array.Empty<EthAddress>();
|
||||
|
||||
var tokens = app.Config.EthAddressFile.Split(";", StringSplitOptions.RemoveEmptyEntries);
|
||||
return tokens.Select(ConvertToAddress).Where(a => a != null).ToArray();
|
||||
return tokens.Select(ConvertToAddress).Where(a => a != null).Cast<EthAddress>().ToArray();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
@ -37,8 +36,9 @@ namespace AutoClient.Modes.FolderStore
|
||||
}
|
||||
}
|
||||
|
||||
private EthAddress ConvertToAddress(string t)
|
||||
private EthAddress? ConvertToAddress(string t)
|
||||
{
|
||||
if (!File.Exists(t)) return null;
|
||||
return new EthAddress(
|
||||
File.ReadAllText(t)
|
||||
.Trim()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user