- Fix login not working
- Sessions are now saved after logging in
- Check if promotions, and searches are available before counting total point amount
This commit is contained in:
TheNetsky
2024-03-01 12:19:48 +01:00
parent cf7f7ac790
commit 64048e35d7
5 changed files with 26 additions and 20 deletions

View File

@@ -178,8 +178,7 @@ export class MicrosoftRewardsBot {
}
// Save cookies
const cookies = await browser.cookies()
await saveSessionData(this.config.sessionPath, account.email, this.isMobile, cookies)
await saveSessionData(this.config.sessionPath, browser, account.email, this.isMobile)
// Close desktop browser
return await this.closeBrowser(browser, account.email)
@@ -247,8 +246,7 @@ export class MicrosoftRewardsBot {
private async closeBrowser(browser: BrowserContext, email: string) {
// Save cookies
const cookies = await browser.cookies()
await saveSessionData(this.config.sessionPath, email, this.isMobile, cookies)
await saveSessionData(this.config.sessionPath, browser, email, this.isMobile)
// Close browser
await browser.close()