Skip to content

Commit

Permalink
Merge branch 'develop' into fix-asset-picker-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
salimtb authored Jul 2, 2024
2 parents 9ca3a51 + b893161 commit d70d04f
Show file tree
Hide file tree
Showing 64 changed files with 836 additions and 682 deletions.
9 changes: 0 additions & 9 deletions app/_locales/de/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/el/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/en/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/es/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/fr/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/hi/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/id/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/ja/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/ko/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/pt/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/ru/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/tl/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/tr/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/vi/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/zh_CN/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/scripts/controllers/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export default class PreferencesController {
eth_sign: false,
},
useMultiAccountBalanceChecker: true,
hasDismissedOpenSeaToBlockaidBanner: false,
useSafeChainsListValidation: true,
// set to true means the dynamic list from the API is being used
// set to false will be using the static list from contract-metadata
Expand Down Expand Up @@ -191,14 +190,6 @@ export default class PreferencesController {
this.store.updateState({ useMultiAccountBalanceChecker: val });
}

/**
* Setter for the `dismissOpenSeaToBlockaidBanner` property
*
*/
dismissOpenSeaToBlockaidBanner() {
this.store.updateState({ hasDismissedOpenSeaToBlockaidBanner: true });
}

/**
* Setter for the `useSafeChainsListValidation` property
*
Expand Down
17 changes: 0 additions & 17 deletions app/scripts/controllers/preferences.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,23 +308,6 @@ describe('preferences controller', () => {
});
});

describe('dismissOpenSeaToBlockaidBanner', () => {
it('hasDismissedOpenSeaToBlockaidBanner should default to false', () => {
expect(
preferencesController.store.getState()
.hasDismissedOpenSeaToBlockaidBanner,
).toStrictEqual(false);
});

it('should set the hasDismissedOpenSeaToBlockaidBanner property in state', () => {
preferencesController.dismissOpenSeaToBlockaidBanner();
expect(
preferencesController.store.getState()
.hasDismissedOpenSeaToBlockaidBanner,
).toStrictEqual(true);
});
});

describe('setUseSafeChainsListValidation', function () {
it('should default to true', function () {
const state = preferencesController.store.getState();
Expand Down
1 change: 0 additions & 1 deletion app/scripts/lib/setupSentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ export const SENTRY_BACKGROUND_STATE = {
useRequestQueue: true,
useTransactionSimulations: true,
enableMV3TimestampSave: true,
hasDismissedOpenSeaToBlockaidBanner: true,
},
PushPlatformNotificationsController: {
fcmToken: false,
Expand Down
4 changes: 0 additions & 4 deletions app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -2982,10 +2982,6 @@ export default class MetamaskController extends EventEmitter {
preferencesController.setUseMultiAccountBalanceChecker.bind(
preferencesController,
),
dismissOpenSeaToBlockaidBanner:
preferencesController.dismissOpenSeaToBlockaidBanner.bind(
preferencesController,
),
setUseSafeChainsListValidation:
preferencesController.setUseSafeChainsListValidation.bind(
preferencesController,
Expand Down
3 changes: 3 additions & 0 deletions test/e2e/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ export const TEST_SNAPS_SIMPLE_KEYRING_WEBSITE_URL =

/* Address of the VerifyingPaymaster smart contract deployed to Ganache. */
export const VERIFYING_PAYMASTER = '0xbdbDEc38ed168331b1F7004cc9e5392A2272C1D7';

/* Default ganache ETH balance in decimal when first login */
export const DEFAULT_GANACHE_ETH_BALANCE_DEC = '25';
18 changes: 13 additions & 5 deletions test/e2e/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ const { PAGES } = require('./webdriver/driver');
const GanacheSeeder = require('./seeder/ganache-seeder');
const { Bundler } = require('./bundler');
const { SMART_CONTRACTS } = require('./seeder/smart-contracts');
const { ERC_4337_ACCOUNT } = require('./constants');
const {
ERC_4337_ACCOUNT,
DEFAULT_GANACHE_ETH_BALANCE_DEC,
} = require('./constants');

const tinyDelayMs = 200;
const regularDelayMs = tinyDelayMs * 2;
Expand Down Expand Up @@ -730,25 +733,30 @@ const ACCOUNT_1 = '0x5cfe73b6021e818b776b421b1c4db2474086a7e1';
const ACCOUNT_2 = '0x09781764c08de8ca82e156bbf156a3ca217c7950';

const defaultGanacheOptions = {
accounts: [{ secretKey: PRIVATE_KEY, balance: convertETHToHexGwei(25) }],
accounts: [
{
secretKey: PRIVATE_KEY,
balance: convertETHToHexGwei(DEFAULT_GANACHE_ETH_BALANCE_DEC),
},
],
};

const multipleGanacheOptions = {
accounts: [
{
secretKey: PRIVATE_KEY,
balance: convertETHToHexGwei(25),
balance: convertETHToHexGwei(DEFAULT_GANACHE_ETH_BALANCE_DEC),
},
{
secretKey: PRIVATE_KEY_TWO,
balance: convertETHToHexGwei(25),
balance: convertETHToHexGwei(DEFAULT_GANACHE_ETH_BALANCE_DEC),
},
],
};

const generateGanacheOptions = ({
secretKey = PRIVATE_KEY,
balance = convertETHToHexGwei(25),
balance = convertETHToHexGwei(DEFAULT_GANACHE_ETH_BALANCE_DEC),
...otherProps
}) => {
const accounts = [
Expand Down
18 changes: 18 additions & 0 deletions test/e2e/page-objects/pages/header-navbar.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Driver } from '../../webdriver/driver';

class HeaderNavbar {
private driver: Driver;

private accountMenuButton: string;

constructor(driver: Driver) {
this.driver = driver;
this.accountMenuButton = '[data-testid="account-menu-icon"]';
}

async openAccountMenu(): Promise<void> {
await this.driver.clickElement(this.accountMenuButton);
}
}

export default HeaderNavbar;
Loading

0 comments on commit d70d04f

Please sign in to comment.