Skip to content

Commit

Permalink
Merge branch 'master' into ag/fix/popup-not-opening-out-of-bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurgeron authored Oct 29, 2024
2 parents 306f38e + 7d1d08d commit b3a132d
Show file tree
Hide file tree
Showing 34 changed files with 1,446 additions and 248 deletions.
5 changes: 0 additions & 5 deletions .changeset/happy-queens-rescue.md

This file was deleted.

2 changes: 0 additions & 2 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ jobs:
tests-e2e-contracts:
name: E2E Contract Tests - Local
runs-on: buildjet-8vcpu-ubuntu-2204
# Commented until the Playwright bug is fixed
if: false
steps:
- uses: actions/checkout@v3
- uses: FuelLabs/github-actions/setups/node@master
Expand Down
8 changes: 3 additions & 5 deletions docker/fuel-core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# We should be supporting always the same fuel-core version as the fuels (ts-sdk)
# https://github.com/FuelLabs/fuels-ts/blob/master/internal/fuel-core/VERSION
FROM ghcr.io/fuellabs/fuel-core:v0.39.0
FROM ghcr.io/fuellabs/fuel-core:v0.40.0

# dependencies
ENV DEBIAN_FRONTEND=noninteractive
Expand All @@ -19,17 +19,15 @@ COPY ./genesis_coins.json .

RUN git clone \
https://github.com/FuelLabs/chain-configuration.git \
/chain-configuration && \
cd /chain-configuration && \
git checkout 0dc0960f14da7b6650b5438dc1e99d7ff7acec73
/chain-configuration

# Copy the base local configuration
RUN cp -R /chain-configuration/local/* ./

# Copy the testnet consensus parameters and state transition bytecode
RUN cp /chain-configuration/upgradelog/ignition-devnet/consensus_parameters/13.json \
./latest_consensus_parameters.json
RUN cp /chain-configuration/upgradelog/ignition-devnet/state_transition_function/15.wasm \
RUN cp /chain-configuration/upgradelog/ignition-devnet/state_transition_function/16.wasm \
./state_transition_bytecode.wasm

# update local state_config with custom genesis coins config
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"@changesets/cli": "^2.26.2",
"@fuels/ts-config": "0.20.0",
"@jest/types": "29.6.3",
"@playwright/test": "1.46.1",
"@types/jest": "^29.5.5",
"@types/node": "20.8.4",
"@types/react": "^18.3.3",
Expand All @@ -88,8 +89,7 @@
"ts-node": "^10.9.1",
"turbo": "^1.10.15",
"typescript": "^5.2.2",
"updates": "^15.0.2",
"@playwright/test": "1.46.1"
"updates": "^15.0.2"
},
"pnpm": {
"peerDependencyRules": {
Expand Down Expand Up @@ -123,7 +123,8 @@
"send@<0.19.0": ">=0.19.0",
"serve-static@<1.16.0": ">=1.16.0",
"rollup@>=4.0.0 <4.22.4": ">=4.22.4",
"fuels": "0.96.1"
"fuels": "0.96.1",
"secp256k1@=5.0.0": ">=5.0.1"
}
}
}
22 changes: 22 additions & 0 deletions packages/app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# fuels-wallet

## 0.40.1

### Patch Changes

- [#1617](https://github.com/FuelLabs/fuels-wallet/pull/1617) [`3e754563`](https://github.com/FuelLabs/fuels-wallet/commit/3e75456306e43b2c6edf23869667d3dc1b54bfef) Thanks [@luizstacio](https://github.com/luizstacio)! - fix chrome runtim loader

- Updated dependencies []:
- @fuel-wallet/connections@0.40.1

## 0.40.0

### Minor Changes

- [#1611](https://github.com/FuelLabs/fuels-wallet/pull/1611) [`5cf00d8d`](https://github.com/FuelLabs/fuels-wallet/commit/5cf00d8dab50802cd8f5f35213833f21cf779537) Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - fix: update networks more simply

### Patch Changes

- [#1612](https://github.com/FuelLabs/fuels-wallet/pull/1612) [`3a6f00a4`](https://github.com/FuelLabs/fuels-wallet/commit/3a6f00a45781a9f2a8f4b524cd561312f6cf1653) Thanks [@arthurgeron](https://github.com/arthurgeron)! - Updated TOS

- Updated dependencies []:
- @fuel-wallet/connections@0.40.0

## 0.39.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "fuels-wallet",
"private": true,
"version": "0.39.0",
"version": "0.40.1",
"database": "23",
"scripts": {
"build:all": "run-s build:web build:crx build:storybook",
Expand Down
4 changes: 3 additions & 1 deletion packages/app/public/TermOfService.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## Fuel Wallet Testnet Terms Of Use Agreement
## Fuel Wallet Terms Of Use Agreement

Last updated: October 16, 2024

## 1. The Fuel Wallet

Expand Down
36 changes: 36 additions & 0 deletions packages/app/vite-utils/fix-build-crx.plugin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { writeFileSync } from 'node:fs';
import { join } from 'node:path';
import type { Plugin } from 'vite';

type FixCRXPlugin = {
outDir?: string;
};

export const fixCRXBuildPlugin = ({ outDir }: FixCRXPlugin) => {
const plugin: Plugin = {
name: 'fix-crx-plugin',
apply: 'build',
closeBundle: async () => {
const manifestPath = join(__dirname, '..', outDir, '/manifest.json');
console.log(manifestPath);
console.log(outDir);
const manifest = require(manifestPath);
const webAccessibleResources = manifest.web_accessible_resources;

const updatedWebAccessibleResources = webAccessibleResources.map(
(resource) => {
if (resource.use_dynamic_url) {
return {
...resource,
use_dynamic_url: false,
};
}
return resource;
}
);
manifest.web_accessible_resources = updatedWebAccessibleResources;
writeFileSync(manifestPath, JSON.stringify(manifest, null, 2), 'utf8');
},
};
return plugin;
};
1 change: 1 addition & 0 deletions packages/app/vite-utils/vite.base.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Mode, plugin as viteMdPlugin } from 'vite-plugin-markdown';
import tsconfigPaths from 'vite-tsconfig-paths';

import '../load.envs.js';
import { fixCRXBuildPlugin } from './fix-build-crx.plugin.js';

const linkDeps = process.env.LINK_DEPS?.trim().split(' ').filter(Boolean) || [];

Expand Down
4 changes: 4 additions & 0 deletions packages/app/vite.crx.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { crx } from '@crxjs/vite-plugin';
import { defineConfig } from 'vite';

import manifest from './manifest.config';
import { fixCRXBuildPlugin } from './vite-utils/fix-build-crx.plugin';
import baseConfig from './vite-utils/vite.base.config';
import { zipBuildPlugin } from './vite-utils/zip-build.plugin';

Expand All @@ -21,6 +22,9 @@ export default defineConfig({
crx({
manifest,
}),
fixCRXBuildPlugin({
outDir: OUT_DIT,
}),
zipBuildPlugin({
inDir: OUT_DIT,
outDir: baseConfig.build?.outDir,
Expand Down
4 changes: 4 additions & 0 deletions packages/connections/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @fuel-wallet/connections

## 0.40.1

## 0.40.0

## 0.39.0

## 0.38.0
Expand Down
4 changes: 2 additions & 2 deletions packages/connections/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@fuel-wallet/connections",
"private": true,
"description": "Fuel Wallet Connections for CRX.",
"version": "0.39.0",
"version": "0.40.1",
"license": "Apache-2.0",
"main": "src/index.ts",
"publishConfig": {
Expand Down Expand Up @@ -31,7 +31,7 @@
"uuid": "^9.0.1"
},
"peerDependencies": {
"fuels": "0.95.0"
"fuels": "0.96.1"
},
"devDependencies": {
"@fuel-wallet/types": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ test.describe('Deposit Half ETH', () => {

const depositHalfInput = page
.getByLabel('Deposit half eth card')
.locator('input');
.getByRole('textbox');
await depositHalfInput.fill(depositAmount);

const depositHalfButton = getButtonByText(page, 'Deposit Half ETH', true);
Expand Down Expand Up @@ -96,15 +96,14 @@ test.describe('Deposit Half ETH', () => {
// });

// test to and from addresses
const fuelContractId = toBech32(MAIN_CONTRACT_ID);
await checkAddresses(
{ address: fuelWallet.address.toAddress(), isContract: false },
{ address: fuelContractId, isContract: true },
{ address: fuelWallet.address.toString(), isContract: false },
{ address: MAIN_CONTRACT_ID, isContract: true },
walletNotificationPage
);
await checkAddresses(
{ address: fuelContractId, isContract: true },
{ address: fuelWallet.address.toAddress(), isContract: false },
{ address: MAIN_CONTRACT_ID, isContract: true },
{ address: fuelWallet.address.toString(), isContract: false },
walletNotificationPage
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,14 @@ test.describe('Forward and Mint Multicall', () => {
// maxFee: fee.add(100),
// });

const fuelContractId = toBech32(MAIN_CONTRACT_ID);
await checkAddresses(
{ address: fuelWallet.address.toAddress(), isContract: false },
{ address: fuelContractId, isContract: true },
{ address: fuelWallet.address.toString(), isContract: false },
{ address: MAIN_CONTRACT_ID, isContract: true },
walletNotificationPage
);
await checkAddresses(
{ address: fuelContractId, isContract: true },
{ address: fuelWallet.address.toAddress(), isContract: false },
{ address: MAIN_CONTRACT_ID, isContract: true },
{ address: fuelWallet.address.toString(), isContract: false },
walletNotificationPage
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ test.describe('Forward Custom Asset', () => {
};
const { waitForResult } = await contract.functions
.mint(recipient, await getBaseAssetId(), bn(100_000_000_000))
.txParams({ gasLimit: 1_000_000 })
.call();

await waitForResult();
Expand All @@ -68,7 +67,7 @@ test.describe('Forward Custom Asset', () => {
const formattedForwardCustomAssetAmount = '12,345';
const forwardCustomAssetInput = page
.getByLabel('Forward custom asset card')
.locator('input');
.getByRole('textbox');
await forwardCustomAssetInput.fill(forwardCustomAssetAmount);

const forwardCustomAssetButton = getButtonByText(
Expand Down Expand Up @@ -107,10 +106,9 @@ test.describe('Forward Custom Asset', () => {
// maxFee: fee.add(100),
// });

const fuelContractId = toBech32(MAIN_CONTRACT_ID);
await checkAddresses(
{ address: fuelWallet.address.toAddress(), isContract: false },
{ address: fuelContractId, isContract: true },
{ address: fuelWallet.address.toString(), isContract: false },
{ address: MAIN_CONTRACT_ID, isContract: true },
walletNotificationPage
);

Expand Down
7 changes: 3 additions & 4 deletions packages/e2e-contract-tests/playwright/e2e/ForwardEth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ test.describe('Forward Eth', () => {

const forwardEthInput = page
.getByLabel('Forward eth card')
.locator('input');
.getByRole('textbox');
await forwardEthInput.fill(forwardEthAmount);

const forwardEthButton = getButtonByText(page, 'Forward ETH');
Expand Down Expand Up @@ -85,10 +85,9 @@ test.describe('Forward Eth', () => {
// });

// test to and from addresses
const fuelContractId = toBech32(MAIN_CONTRACT_ID);
await checkAddresses(
{ address: fuelWallet.address.toAddress(), isContract: false },
{ address: fuelContractId, isContract: true },
{ address: fuelWallet.address.toString(), isContract: false },
{ address: MAIN_CONTRACT_ID, isContract: true },
walletNotificationPage
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,22 +117,21 @@ test.describe('Forward Half ETH and Mint External Custom Asset', () => {
// maxFee: fee.add(100),
// });

const fuelContractId = toBech32(MAIN_CONTRACT_ID);
await checkAddresses(
{ address: fuelWallet.address.toAddress(), isContract: false },
{ address: fuelContractId, isContract: true },
{ address: fuelWallet.address.toString(), isContract: false },
{ address: MAIN_CONTRACT_ID, isContract: true },
walletNotificationPage
);
await checkAddresses(
{ address: fuelWallet.address.toAddress(), isContract: false },
{ address: toBech32(EXTERNAL_CONTRACT_ID), isContract: true },
{ address: fuelWallet.address.toString(), isContract: false },
{ address: EXTERNAL_CONTRACT_ID, isContract: true },
walletNotificationPage,
1,
1
);
await checkAddresses(
{ address: fuelContractId, isContract: true },
{ address: fuelWallet.address.toAddress(), isContract: false },
{ address: MAIN_CONTRACT_ID, isContract: true },
{ address: fuelWallet.address.toString(), isContract: false },
walletNotificationPage
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,14 @@ test.describe('Forward Half ETH and Mint Custom Asset', () => {
// });

// test to and from addresses
const fuelContractId = toBech32(MAIN_CONTRACT_ID);
await checkAddresses(
{ address: fuelWallet.address.toAddress(), isContract: false },
{ address: fuelContractId, isContract: true },
{ address: fuelWallet.address.toString(), isContract: false },
{ address: MAIN_CONTRACT_ID, isContract: true },
walletNotificationPage
);
await checkAddresses(
{ address: fuelContractId, isContract: true },
{ address: fuelWallet.address.toAddress(), isContract: false },
{ address: MAIN_CONTRACT_ID, isContract: true },
{ address: fuelWallet.address.toString(), isContract: false },
walletNotificationPage
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,13 @@ test.describe('Forward Half Custom Asset', () => {
const assetId = calculateAssetId(MAIN_CONTRACT_ID, await getBaseAssetId());
const { waitForResult } = await contract.functions
.mint(recipient, await getBaseAssetId(), bn(100_000_000_000))
.txParams({ gasLimit: 1_000_000 })
.call();

await waitForResult();

const forwardHalfCustomAssetInput = page
.getByLabel('Forward half custom asset card')
.locator('input');
.getByRole('textbox');
await forwardHalfCustomAssetInput.fill(forwardCustomAssetAmount);

const forwardHalfCustomAssetButton = getButtonByText(
Expand Down Expand Up @@ -117,15 +116,14 @@ test.describe('Forward Half Custom Asset', () => {
// });

// test to and from addresses
const fuelContractId = toBech32(MAIN_CONTRACT_ID);
await checkAddresses(
{ address: fuelWallet.address.toAddress(), isContract: false },
{ address: fuelContractId, isContract: true },
{ address: fuelWallet.address.toString(), isContract: false },
{ address: MAIN_CONTRACT_ID, isContract: true },
walletNotificationPage
);
await checkAddresses(
{ address: fuelContractId, isContract: true },
{ address: fuelWallet.address.toAddress(), isContract: false },
{ address: MAIN_CONTRACT_ID, isContract: true },
{ address: fuelWallet.address.toString(), isContract: false },
walletNotificationPage
);

Expand Down
Loading

0 comments on commit b3a132d

Please sign in to comment.