Add method to get trade token by using Steamkit (#947)

* Fix NullReferenceException in AcceptConfirmations()

* Add method to get trade token by using steamkit

* Remove AWH way to get token and caching it

* Accidentally removed some logic, fix
This commit is contained in:
Vital7
2018-11-19 17:16:35 +03:00
committed by Łukasz Domeradzki
parent d2a17e1c0e
commit 25dcccdb54
4 changed files with 39 additions and 61 deletions

View File

@@ -1,4 +1,4 @@
// _ _ _ ____ _ _____
// _ _ _ ____ _ _____
// / \ _ __ ___ | |__ (_)/ ___| | |_ ___ __ _ _ __ ___ | ___|__ _ _ __ _ __ ___
// / _ \ | '__|/ __|| '_ \ | |\___ \ | __|/ _ \ / _` || '_ ` _ \ | |_ / _` || '__|| '_ ` _ \
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
@@ -103,7 +103,7 @@ namespace ArchiSteamFarm {
// Don't announce if we don't meet conditions
string tradeToken;
if (!await ShouldAnnounce().ConfigureAwait(false) || string.IsNullOrEmpty(tradeToken = await Bot.ArchiWebHandler.GetTradeToken().ConfigureAwait(false))) {
if (!await ShouldAnnounce().ConfigureAwait(false) || string.IsNullOrEmpty(tradeToken = await Bot.ArchiHandler.GetTradeToken().ConfigureAwait(false))) {
LastAnnouncementCheck = DateTime.UtcNow;
ShouldSendHeartBeats = false;
return;