diff --git a/Tools/BiblioTech/Commands/GetBalanceCommand.cs b/Tools/BiblioTech/Commands/GetBalanceCommand.cs index 964d7c2..3c98335 100644 --- a/Tools/BiblioTech/Commands/GetBalanceCommand.cs +++ b/Tools/BiblioTech/Commands/GetBalanceCommand.cs @@ -31,8 +31,14 @@ namespace BiblioTech.Commands return; } - var eth = gethNode.GetEthBalance(addr); - var testTokens = contracts.GetTestTokenBalance(addr); + var eth = 0.Eth(); + var testTokens = 0.TestTokens(); + + await Task.Run(() => + { + eth = gethNode.GetEthBalance(addr); + testTokens = contracts.GetTestTokenBalance(addr); + }); await context.Followup($"{context.Command.User.Username} has {eth} and {testTokens}."); } diff --git a/Tools/BiblioTech/Commands/MintCommand.cs b/Tools/BiblioTech/Commands/MintCommand.cs index faf62c8..a017ee2 100644 --- a/Tools/BiblioTech/Commands/MintCommand.cs +++ b/Tools/BiblioTech/Commands/MintCommand.cs @@ -33,8 +33,14 @@ namespace BiblioTech.Commands var report = new List(); - var sentEth = ProcessEth(gethNode, addr, report); - var mintedTokens = ProcessTokens(contracts, addr, report); + Transaction? sentEth = null; + Transaction? mintedTokens = null; + + await Task.Run(() => + { + sentEth = ProcessEth(gethNode, addr, report); + mintedTokens = ProcessTokens(contracts, addr, report); + }); Program.UserRepo.AddMintEventForUser(userId, addr, sentEth, mintedTokens);