Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version bump for dev branch #49

Merged
merged 3 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 deletions commands/keplr.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,31 +178,20 @@ const keplr = {
async importWallet(
secretWordsOrPrivateKey,
password,
newAccount,
walletName,
selectedChains,
) {
await module.exports.goToRegistration();
await playwright.waitAndClickByText(
newAccount
? onboardingElements.createWalletButton
: onboardingElements.existingWalletButton,
onboardingElements.existingWalletButton,
await playwright.keplrWindow(),
);

await playwright.waitAndClickByText(
newAccount
? onboardingElements.importRecoveryPhraseButton
: onboardingElements.useRecoveryPhraseButton,
onboardingElements.useRecoveryPhraseButton,
await playwright.keplrWindow(),
);

newAccount &&
(await playwright.waitAndClickByText(
onboardingElements.useRecoveryPhraseButton,
await playwright.keplrWindow(),
));

if (secretWordsOrPrivateKey.includes(' ')) {
await module.exports.importWalletWithPhrase(
secretWordsOrPrivateKey,
Expand Down Expand Up @@ -377,7 +366,6 @@ const keplr = {
{
secretWordsOrPrivateKey,
password,
newAccount,
walletName,
selectedChains,
createNewWallet,
Expand All @@ -398,7 +386,6 @@ const keplr = {
await module.exports.importWallet(
secretWordsOrPrivateKey,
password,
newAccount,
walletName,
selectedChains,
);
Expand Down
2 changes: 0 additions & 2 deletions pages/keplr/first-time-flow-page.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const createWalletButton = 'Create a new wallet';
const existingWalletButton = 'Import an existing wallet';
const importRecoveryPhraseButton = 'Import existing recovery phrase';
const createNewRecoveryPhraseButton = 'Create new recovery phrase';
const showMyPhraseButton = 'I understood. Show my phrase.';
const copyToClipboardButton = 'Copy to clipboard';
Expand All @@ -24,7 +23,6 @@ const importButtonSelector = 'button:has-text("Import")';
module.exports.onboardingElements = {
existingWalletButton,
createWalletButton,
importRecoveryPhraseButton,
createNewRecoveryPhraseButton,
showMyPhraseButton,
copyToClipboardButton,
Expand Down
2 changes: 0 additions & 2 deletions plugins/keplr-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,13 @@ module.exports = (on, config) => {
setupWallet: async ({
secretWordsOrPrivateKey,
password,
newAccount,
walletName,
selectedChains,
createNewWallet,
}) => {
await keplr.initialSetup(null, {
secretWordsOrPrivateKey,
password,
newAccount,
walletName,
selectedChains,
createNewWallet,
Expand Down
2 changes: 0 additions & 2 deletions support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@ Cypress.Commands.add('setupWallet', (args = {}) => {
secretWords,
privateKey,
password = 'Test1234',
newAccount = false,
walletName = 'My Wallet',
selectedChains = [],
createNewWallet = false,
Expand All @@ -426,7 +425,6 @@ Cypress.Commands.add('setupWallet', (args = {}) => {
privateKey ||
'orbit bench unit task food shock brand bracket domain regular warfare company announce wheel grape trust sphere boy doctor half guard ritual three ecology',
password,
newAccount,
walletName,
selectedChains,
createNewWallet,
Expand Down
1 change: 0 additions & 1 deletion support/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,6 @@ declare namespace Cypress {
secretWords?: string;
privateKey?: string;
password?: string;
newAccount?: boolean;
walletName?: string;
selectedChains?: Array<string>;
createNewWallet?: boolean;
Expand Down
3 changes: 1 addition & 2 deletions tests/e2e/specs/keplr/keplr-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,11 @@ describe('Keplr', () => {
'Offer accepted',
);
});
it(`should create a new wallet using 24 word phrase`, () => {
it(`should import a wallet and add selected chains`, () => {
cy.setupWallet({
secretWords:
'orbit bench unit task food shock brand bracket domain regular warfare company announce wheel grape trust sphere boy doctor half guard ritual three ecology',
password: 'Test1234',
newAccount: true,
walletName: 'My Wallet 2',
selectedChains: ['Agoric localhost', 'Secret Network'],
}).then(setupFinished => {
Expand Down
Loading