From a6417c32ba42c43c02dc5cee24a313e67ea3bce1 Mon Sep 17 00:00:00 2001 From: "r3kt.eth" Date: Thu, 17 Aug 2023 19:01:38 +0200 Subject: [PATCH] add resetstate to metamask Signed-off-by: r3kt.eth --- commands/metamask.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/commands/metamask.js b/commands/metamask.js index 1d93ca4e0..ef38eb8dd 100644 --- a/commands/metamask.js +++ b/commands/metamask.js @@ -54,6 +54,21 @@ let walletAddress; let switchBackToCypressWindow; const metamask = { + async resetState() { + log('Resetting state of metamask'); + extensionId = undefined; + extensionVersion = undefined; + extensionHomeUrl = undefined; + extensionSettingsUrl = undefined; + extensionAdvancedSettingsUrl = undefined; + extensionExperimentalSettingsUrl = undefined; + extensionAddNetworkUrl = undefined; + extensionNewAccountUrl = undefined; + extensionImportAccountUrl = undefined; + extensionImportTokenUrl = undefined; + walletAddress = undefined; + switchBackToCypressWindow = undefined; + }, extensionId: () => { return extensionId; },