w3wallets 0.5.1 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7 -2
- package/dist/index.mjs +7 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -67,7 +67,7 @@ declare class Metamask extends Wallet {
|
|
|
67
67
|
* @param mnemonic 12-word mnemonic seed phrase
|
|
68
68
|
*/
|
|
69
69
|
onboard(mnemonic: string, password?: string): Promise<void>;
|
|
70
|
-
switchAccount(nameOrAddress: string): Promise<void>;
|
|
70
|
+
switchAccount(nameOrAddress: string, network?: "ETH" | "SOL"): Promise<void>;
|
|
71
71
|
importAccount(privateKey: string): Promise<void>;
|
|
72
72
|
addAccount(accountName?: string): Promise<void>;
|
|
73
73
|
getAccountName(): Promise<string>;
|
|
@@ -76,6 +76,7 @@ declare class Metamask extends Wallet {
|
|
|
76
76
|
approve(): Promise<void>;
|
|
77
77
|
deny(): Promise<void>;
|
|
78
78
|
private usingNotificationPage;
|
|
79
|
+
private clickTopRightCornerToCloseAllTheMarketingBullshit;
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
declare function withWallets<T extends readonly WalletName[]>(test: typeof test, ...config: NoDuplicates<T>): playwright_test.TestType<playwright_test.PlaywrightTestArgs & playwright_test.PlaywrightTestOptions & {
|
package/dist/index.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ declare class Metamask extends Wallet {
|
|
|
67
67
|
* @param mnemonic 12-word mnemonic seed phrase
|
|
68
68
|
*/
|
|
69
69
|
onboard(mnemonic: string, password?: string): Promise<void>;
|
|
70
|
-
switchAccount(nameOrAddress: string): Promise<void>;
|
|
70
|
+
switchAccount(nameOrAddress: string, network?: "ETH" | "SOL"): Promise<void>;
|
|
71
71
|
importAccount(privateKey: string): Promise<void>;
|
|
72
72
|
addAccount(accountName?: string): Promise<void>;
|
|
73
73
|
getAccountName(): Promise<string>;
|
|
@@ -76,6 +76,7 @@ declare class Metamask extends Wallet {
|
|
|
76
76
|
approve(): Promise<void>;
|
|
77
77
|
deny(): Promise<void>;
|
|
78
78
|
private usingNotificationPage;
|
|
79
|
+
private clickTopRightCornerToCloseAllTheMarketingBullshit;
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
declare function withWallets<T extends readonly WalletName[]>(test: typeof test, ...config: NoDuplicates<T>): playwright_test.TestType<playwright_test.PlaywrightTestArgs & playwright_test.PlaywrightTestOptions & {
|
package/dist/index.js
CHANGED
|
@@ -221,12 +221,14 @@ var Metamask = class extends Wallet {
|
|
|
221
221
|
await this.page.getByTestId("onboarding-complete-done").click();
|
|
222
222
|
await this.page.getByTestId("pin-extension-next").click();
|
|
223
223
|
await this.page.getByTestId("pin-extension-done").click();
|
|
224
|
+
await this.page.waitForTimeout(1e3);
|
|
225
|
+
await this.clickTopRightCornerToCloseAllTheMarketingBullshit();
|
|
224
226
|
}
|
|
225
|
-
async switchAccount(nameOrAddress) {
|
|
227
|
+
async switchAccount(nameOrAddress, network = "ETH") {
|
|
226
228
|
if (nameOrAddress.startsWith("0x"))
|
|
227
229
|
nameOrAddress = nameOrAddress.slice(0, 7);
|
|
228
230
|
await this.page.getByTestId("account-menu-icon").click();
|
|
229
|
-
await this.page.locator(".multichain-account-menu-popover__list--menu-item").filter({ hasText: nameOrAddress }).click();
|
|
231
|
+
await this.page.locator(".multichain-account-menu-popover__list--menu-item").filter({ hasText: nameOrAddress }).filter({ has: this.page.getByTestId("second-currency-display").filter({ hasText: network }) }).click();
|
|
230
232
|
}
|
|
231
233
|
async importAccount(privateKey) {
|
|
232
234
|
await this.page.getByTestId("account-menu-icon").click();
|
|
@@ -298,6 +300,9 @@ var Metamask = class extends Wallet {
|
|
|
298
300
|
await action(p);
|
|
299
301
|
await p.close();
|
|
300
302
|
}
|
|
303
|
+
async clickTopRightCornerToCloseAllTheMarketingBullshit() {
|
|
304
|
+
await this.page.mouse.click(1e3, 10);
|
|
305
|
+
}
|
|
301
306
|
};
|
|
302
307
|
|
|
303
308
|
// src/withWallets.ts
|
package/dist/index.mjs
CHANGED
|
@@ -187,12 +187,14 @@ var Metamask = class extends Wallet {
|
|
|
187
187
|
await this.page.getByTestId("onboarding-complete-done").click();
|
|
188
188
|
await this.page.getByTestId("pin-extension-next").click();
|
|
189
189
|
await this.page.getByTestId("pin-extension-done").click();
|
|
190
|
+
await this.page.waitForTimeout(1e3);
|
|
191
|
+
await this.clickTopRightCornerToCloseAllTheMarketingBullshit();
|
|
190
192
|
}
|
|
191
|
-
async switchAccount(nameOrAddress) {
|
|
193
|
+
async switchAccount(nameOrAddress, network = "ETH") {
|
|
192
194
|
if (nameOrAddress.startsWith("0x"))
|
|
193
195
|
nameOrAddress = nameOrAddress.slice(0, 7);
|
|
194
196
|
await this.page.getByTestId("account-menu-icon").click();
|
|
195
|
-
await this.page.locator(".multichain-account-menu-popover__list--menu-item").filter({ hasText: nameOrAddress }).click();
|
|
197
|
+
await this.page.locator(".multichain-account-menu-popover__list--menu-item").filter({ hasText: nameOrAddress }).filter({ has: this.page.getByTestId("second-currency-display").filter({ hasText: network }) }).click();
|
|
196
198
|
}
|
|
197
199
|
async importAccount(privateKey) {
|
|
198
200
|
await this.page.getByTestId("account-menu-icon").click();
|
|
@@ -264,6 +266,9 @@ var Metamask = class extends Wallet {
|
|
|
264
266
|
await action(p);
|
|
265
267
|
await p.close();
|
|
266
268
|
}
|
|
269
|
+
async clickTopRightCornerToCloseAllTheMarketingBullshit() {
|
|
270
|
+
await this.page.mouse.click(1e3, 10);
|
|
271
|
+
}
|
|
267
272
|
};
|
|
268
273
|
|
|
269
274
|
// src/withWallets.ts
|