Skip to content

Commit

Permalink
Merge branch 'develop' into 17191/onboarding-unit-tests-create-new-vault
Browse files Browse the repository at this point in the history
  • Loading branch information
tmashuang authored Apr 17, 2023
2 parents d111c88 + e5835ac commit 065160c
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 212 deletions.
12 changes: 6 additions & 6 deletions app/scripts/controllers/detect-tokens.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ describe('DetectTokensController', function () {

it('should be called on every polling period', async function () {
const clock = sandbox.useFakeTimers();
network.setProviderType(NETWORK_TYPES.MAINNET);
await network.setProviderType(NETWORK_TYPES.MAINNET);
const controller = new DetectTokensController({
preferences,
network,
Expand All @@ -304,7 +304,7 @@ describe('DetectTokensController', function () {

it('should not check and add tokens while on unsupported networks', async function () {
sandbox.useFakeTimers();
network.setProviderType(NETWORK_TYPES.SEPOLIA);
await network.setProviderType(NETWORK_TYPES.SEPOLIA);
const tokenListMessengerSepolia = new ControllerMessenger().getRestricted({
name: 'TokenListController',
});
Expand Down Expand Up @@ -337,7 +337,7 @@ describe('DetectTokensController', function () {

it('should skip adding tokens listed in ignoredTokens array', async function () {
sandbox.useFakeTimers();
network.setProviderType(NETWORK_TYPES.MAINNET);
await network.setProviderType(NETWORK_TYPES.MAINNET);
const controller = new DetectTokensController({
preferences,
network,
Expand Down Expand Up @@ -388,7 +388,7 @@ describe('DetectTokensController', function () {

it('should check and add tokens while on supported networks', async function () {
sandbox.useFakeTimers();
network.setProviderType(NETWORK_TYPES.MAINNET);
await network.setProviderType(NETWORK_TYPES.MAINNET);
const controller = new DetectTokensController({
preferences,
network,
Expand Down Expand Up @@ -483,7 +483,7 @@ describe('DetectTokensController', function () {

it('should not trigger detect new tokens when not unlocked', async function () {
const clock = sandbox.useFakeTimers();
network.setProviderType(NETWORK_TYPES.MAINNET);
await network.setProviderType(NETWORK_TYPES.MAINNET);
const controller = new DetectTokensController({
preferences,
network,
Expand All @@ -504,7 +504,7 @@ describe('DetectTokensController', function () {

it('should not trigger detect new tokens when not open', async function () {
const clock = sandbox.useFakeTimers();
network.setProviderType(NETWORK_TYPES.MAINNET);
await network.setProviderType(NETWORK_TYPES.MAINNET);
const controller = new DetectTokensController({
preferences,
network,
Expand Down
Loading

0 comments on commit 065160c

Please sign in to comment.