w3wallets 0.5.2 → 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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -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>;
|
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>;
|
package/dist/index.js
CHANGED
|
@@ -224,11 +224,11 @@ var Metamask = class extends Wallet {
|
|
|
224
224
|
await this.page.waitForTimeout(1e3);
|
|
225
225
|
await this.clickTopRightCornerToCloseAllTheMarketingBullshit();
|
|
226
226
|
}
|
|
227
|
-
async switchAccount(nameOrAddress) {
|
|
227
|
+
async switchAccount(nameOrAddress, network = "ETH") {
|
|
228
228
|
if (nameOrAddress.startsWith("0x"))
|
|
229
229
|
nameOrAddress = nameOrAddress.slice(0, 7);
|
|
230
230
|
await this.page.getByTestId("account-menu-icon").click();
|
|
231
|
-
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();
|
|
232
232
|
}
|
|
233
233
|
async importAccount(privateKey) {
|
|
234
234
|
await this.page.getByTestId("account-menu-icon").click();
|
package/dist/index.mjs
CHANGED
|
@@ -190,11 +190,11 @@ var Metamask = class extends Wallet {
|
|
|
190
190
|
await this.page.waitForTimeout(1e3);
|
|
191
191
|
await this.clickTopRightCornerToCloseAllTheMarketingBullshit();
|
|
192
192
|
}
|
|
193
|
-
async switchAccount(nameOrAddress) {
|
|
193
|
+
async switchAccount(nameOrAddress, network = "ETH") {
|
|
194
194
|
if (nameOrAddress.startsWith("0x"))
|
|
195
195
|
nameOrAddress = nameOrAddress.slice(0, 7);
|
|
196
196
|
await this.page.getByTestId("account-menu-icon").click();
|
|
197
|
-
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();
|
|
198
198
|
}
|
|
199
199
|
async importAccount(privateKey) {
|
|
200
200
|
await this.page.getByTestId("account-menu-icon").click();
|