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

feat: remove feature flag #1551

Merged
merged 30 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3d975e3
feat: remove feature flags
arthurgeron Oct 6, 2024
b64e02a
feat: revert network hide
arthurgeron Oct 6, 2024
109860d
feat: new db version
arthurgeron Oct 6, 2024
06c1930
Merge branch 'master' into ag/feat/fe-638
arthurgeron Oct 6, 2024
7b3bbfc
fix: network item count e2e
arthurgeron Oct 6, 2024
d75794c
Merge branch 'ag/feat/fe-638' of github.com:FuelLabs/fuels-wallet int…
arthurgeron Oct 6, 2024
c62f3e8
chore: changeset
arthurgeron Oct 13, 2024
7ff2614
Merge branch 'master' of github.com:FuelLabs/fuels-wallet into ag/fea…
arthurgeron Oct 13, 2024
755184d
Merge branch 'master' into ag/feat/fe-638
arthurgeron Oct 13, 2024
2f40fcd
Merge branch 'master' into ag/feat/fe-638
arthurgeron Oct 13, 2024
4a70d46
Merge branch 'master' into ag/feat/fe-638
luizstacio Oct 14, 2024
8cde414
Merge branch 'master' into ag/feat/fe-638
arthurgeron Oct 16, 2024
888bd00
feat: return network being edited
arthurgeron Oct 16, 2024
cf82ab9
fix: show correct network while editing
arthurgeron Oct 16, 2024
ff4636a
feat: add aria labels to update network for more precise e2e
arthurgeron Oct 16, 2024
d612288
feat: add e2es for network editing data
arthurgeron Oct 16, 2024
defa8ff
fix: decimal cases of fetched eth values during tx e2e tests
arthurgeron Oct 16, 2024
9daf4df
fix: not executing db upgrades in the right order
arthurgeron Oct 16, 2024
6f8bc16
chore: remove debug page pause
arthurgeron Oct 16, 2024
9cf5155
chore: changeset
arthurgeron Oct 16, 2024
c8bb99c
fix: bridge link in transaction bridge opening twice
arthurgeron Oct 16, 2024
405f04b
revert: cache removal
arthurgeron Oct 16, 2024
82013e3
fix: add missing table entry to db upgrade
arthurgeron Oct 16, 2024
673a2d3
chore: remove is release logic
arthurgeron Oct 16, 2024
1562de9
feat: remove network override based on env
arthurgeron Oct 16, 2024
30f1191
Merge branch 'ag/fix/fe-786' of github.com:FuelLabs/fuels-wallet into…
arthurgeron Oct 16, 2024
281645c
Merge branch 'ag/fix/fe-790' of github.com:FuelLabs/fuels-wallet into…
arthurgeron Oct 16, 2024
2eeef6a
fix: e2e testing popup page
arthurgeron Oct 16, 2024
465c123
feat: update terms of service
arthurgeron Oct 17, 2024
e5dd7d4
fix: wait for window.fuel to be available
arthurgeron Oct 17, 2024
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
14 changes: 14 additions & 0 deletions .changeset/heavy-falcons-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"fuels-wallet": minor
---

Upgrade Database to Version 23 with Network Adjustments

• Added mainnet network to default networks in DB versioning.
• Set the mainnet network as the selected network by default.
Remove Feature Flag Logic

• Eliminated obsolete feature flag functions related to network URLs.
Simplify Auto-Update Mechanism

• Removed unnecessary alarms and background tasks for network creation.
5 changes: 5 additions & 0 deletions .changeset/rude-lizards-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"fuels-wallet": patch
---

Fixed bridge link in transaction bridge opening twice
5 changes: 5 additions & 0 deletions .changeset/shy-items-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"fuels-wallet": patch
---

Fixed Edit Network screen not displaying correct information.
24 changes: 20 additions & 4 deletions packages/app/playwright/crx/crx.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
hasText,
reload,
seedWallet,
visit,
waitAriaLabel,
} from '../commons';
import {
Expand All @@ -19,6 +20,7 @@ import {
CUSTOM_ASSET_INPUT_4,
FUEL_NETWORK,
PRIVATE_KEY,
mockData,
} from '../mocks';

import {
Expand Down Expand Up @@ -76,9 +78,15 @@ test.describe('FuelWallet Extension', () => {

await test.step('Has window.fuel', async () => {
const hasFuel = await blankPage.evaluate(async () => {
// wait for the script to load
await new Promise((resolve) => setTimeout(resolve, 1000));
return typeof window.fuel === 'object';
const maxRetries = 20;
const interval = 1000; // ms
for (let i = 0; i < maxRetries; i++) {
if (typeof window.fuel === 'object') {
return true;
}
await new Promise((resolve) => setTimeout(resolve, interval));
}
return false;
});
expect(hasFuel).toBeTruthy();
});
Expand Down Expand Up @@ -178,6 +186,14 @@ test.describe('FuelWallet Extension', () => {
return page;
});

await test.step('Should select local network', async () => {
const page = await context.newPage();
await mockData(page);
await waitWalletToLoad(popupPage);
await getByAriaLabel(popupPage, 'Selected Network').click();
await getElementByText(popupPage, 'Local network').click();
});

await test.step('Add more accounts', async () => {
async function createAccount() {
await waitWalletToLoad(popupPage);
Expand Down Expand Up @@ -696,7 +712,7 @@ test.describe('FuelWallet Extension', () => {
await popupPage.reload();
}

const initialNetworkAmount = 3;
const initialNetworkAmount = 4;
let networkSelector = getByAriaLabel(popupPage, 'Selected Network');
await networkSelector.click();

Expand Down
12 changes: 9 additions & 3 deletions packages/app/playwright/crx/lock.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,15 @@ test.describe('Lock FuelWallet after inactivity', () => {

await test.step('Has window.fuel', async () => {
const hasFuel = await blankPage.evaluate(async () => {
// wait for the script to load
await new Promise((resolve) => setTimeout(resolve, 1000));
return typeof window.fuel === 'object';
const maxRetries = 20;
const interval = 1000; // ms
for (let i = 0; i < maxRetries; i++) {
if (typeof window.fuel === 'object') {
return true;
}
await new Promise((resolve) => setTimeout(resolve, interval));
}
return false;
});
expect(hasFuel).toBeTruthy();
});
Expand Down
19 changes: 18 additions & 1 deletion packages/app/playwright/e2e/Networks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,23 @@ test.describe('Networks', () => {
await expect(selector).toHaveText(/Another/i);
});

test('should display correct network data while editing', async () => {
await visit(page, '/wallet');
await getByAriaLabel(page, 'Selected Network').click();
const networkItems = page.locator('[aria-label^="fuel_network-item-"]');
for (const networkItem of await networkItems.all()) {
const networkName = await networkItem
.locator('[aria-label="Network name"]')
.textContent();
await networkItem.locator('[aria-label="Update"]').click();
await hasText(page, /Update network/i);
const inputName = getInputByName(page, 'name');
await expect(inputName).toHaveValue(networkName.trim());
getByAriaLabel(page, 'Cancel network update').click();
await hasText(page, /Networks/i);
}
});

test('should be able to update a network', async () => {
await visit(page, '/wallet');
await getByAriaLabel(page, 'Selected Network').click();
Expand All @@ -61,7 +78,7 @@ test.describe('Networks', () => {
const inputName = getInputByName(page, 'name');
await expect(inputName).toBeFocused();
await inputName.fill('Local 1');
const update = getButtonByText(page, /update/i);
const update = getByAriaLabel(page, 'Update network');
expect(update).toBeEnabled();
await update.click();
await hasText(page, /Local 1/);
Expand Down
8 changes: 6 additions & 2 deletions packages/app/playwright/e2e/SendTransaction.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { Browser, Page } from '@playwright/test';
import test, { chromium, expect } from '@playwright/test';
import {
type Bech32Address,
DECIMAL_WEI,
Provider,
Wallet,
bn,
Expand Down Expand Up @@ -182,8 +183,11 @@ test.describe('SendTransaction', () => {
.replace(' ETH', '')
.trim();
// Validating the amount
const regularFeeBigNumber = bn.parseUnits(regularFeeAmount);
const networkFeeBigNumber = bn.parseUnits(networkFeeAmountWithRegular);
const regularFeeBigNumber = bn.parseUnits(regularFeeAmount, DECIMAL_WEI);
const networkFeeBigNumber = bn.parseUnits(
networkFeeAmountWithRegular,
DECIMAL_WEI
);

// Ensure regularFeeAmount is greater than or equal to networkFeeAmountWithRegular
expect(regularFeeBigNumber.gte(networkFeeBigNumber)).toBe(true);
Expand Down
Loading
Loading