Skip to content

Commit

Permalink
Merge remote-tracking branch origin/master into gregs/bx-1327-speed-u…
Browse files Browse the repository at this point in the history
…p-tx-rejected-by-rpc-for-0-gas-extension-crash-on
  • Loading branch information
greg-schrammel committed Apr 10, 2024
2 parents 88915a2 + 8e2fe2d commit 0a91cf7
Show file tree
Hide file tree
Showing 23 changed files with 608 additions and 183 deletions.
128 changes: 46 additions & 82 deletions .github/workflows/build.yml
Expand Up @@ -90,7 +90,7 @@ jobs:
export OS=linux
export FIREFOX_BIN="$(pwd)/firefox/firefox"
yarn firefox:manifest && yarn firefox:zip
yarn vitest:parallel --retry=5
yarn vitest:parallel
- name: Upload deps artifacts
if: steps.FFE2eParallel.outcome == 'failure'
uses: actions/upload-artifact@v3
Expand All @@ -115,16 +115,12 @@ jobs:
# - name: Run e2e Swap (Firefox)
# id: FFE2eSwap
# continue-on-error: true
# uses: nick-fields/retry@v2
# with:
# timeout_minutes: 25
# max_attempts: 2
# command: |
# export BROWSER=firefox
# export OS=linux
# export FIREFOX_BIN="$(pwd)/firefox/firefox"
# yarn firefox:manifest && yarn firefox:zip
# yarn vitest:swap --retry=5
# run: |
# export BROWSER=firefox
# export OS=linux
# export FIREFOX_BIN="$(pwd)/firefox/firefox"
# yarn firefox:manifest && yarn firefox:zip
# yarn vitest:swap
# - name: Upload deps artifacts
# if: steps.FFE2eSwap.outcome == 'failure'
# uses: actions/upload-artifact@v3
Expand All @@ -149,16 +145,12 @@ jobs:
- name: Run e2e Send (Firefox)
id: FFE2eSend
continue-on-error: true
uses: nick-fields/retry@v2
with:
timeout_minutes: 25
max_attempts: 2
command: |
export BROWSER=firefox
export OS=linux
export FIREFOX_BIN="$(pwd)/firefox/firefox"
yarn firefox:manifest && yarn firefox:zip
yarn vitest:send --retry=5
run: |
export BROWSER=firefox
export OS=linux
export FIREFOX_BIN="$(pwd)/firefox/firefox"
yarn firefox:manifest && yarn firefox:zip
yarn vitest:send
- name: Upload deps artifacts
if: steps.FFE2eSend.outcome == 'failure'
uses: actions/upload-artifact@v3
Expand All @@ -183,16 +175,12 @@ jobs:
- name: Run e2e Dapp Interactions (Firefox)
id: FFE2eDappInteractions
continue-on-error: true
uses: nick-fields/retry@v2
with:
timeout_minutes: 25
max_attempts: 2
command: |
export BROWSER=firefox
export OS=linux
export FIREFOX_BIN="$(pwd)/firefox/firefox"
yarn firefox:manifest && yarn firefox:zip
yarn vitest:dappInteractions --retry=5
run: |
export BROWSER=firefox
export OS=linux
export FIREFOX_BIN="$(pwd)/firefox/firefox"
yarn firefox:manifest && yarn firefox:zip
yarn vitest:dappInteractions
- name: Upload deps artifacts
if: steps.FFE2eDappInteractions.outcome == 'failure'
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -222,7 +210,7 @@ jobs:
export BROWSER=chrome
export OS=linux
export CHROMIUM_BIN=$(find chrome -type f -name 'chrome')
yarn vitest:parallel --retry=5
yarn vitest:parallel
- name: Upload deps artifacts
if: steps.ChromeE2EParallel.outcome == 'failure'
uses: actions/upload-artifact@v3
Expand All @@ -247,15 +235,11 @@ jobs:
- name: Run e2e swap (Chrome)
id: ChromeE2ESwaps
continue-on-error: true
uses: nick-fields/retry@v2
with:
timeout_minutes: 25
max_attempts: 2
command: |
export BROWSER=chrome
export OS=linux
export CHROMIUM_BIN=$(find chrome -type f -name 'chrome')
yarn vitest:swap
run: |
export BROWSER=chrome
export OS=linux
export CHROMIUM_BIN=$(find chrome -type f -name 'chrome')
yarn vitest:swap
- name: Upload deps artifacts
if: steps.ChromeE2ESwaps.outcome == 'failure'
uses: actions/upload-artifact@v3
Expand All @@ -280,15 +264,11 @@ jobs:
- name: Run e2e send (Chrome)
id: ChromeE2ESend
continue-on-error: true
uses: nick-fields/retry@v2
with:
timeout_minutes: 25
max_attempts: 2
command: |
export BROWSER=chrome
export OS=linux
export CHROMIUM_BIN=$(find chrome -type f -name 'chrome')
yarn vitest:send --retry=5
run: |
export BROWSER=chrome
export OS=linux
export CHROMIUM_BIN=$(find chrome -type f -name 'chrome')
yarn vitest:send
- name: Upload deps artifacts
if: steps.ChromeE2ESend.outcome == 'failure'
uses: actions/upload-artifact@v3
Expand All @@ -313,15 +293,11 @@ jobs:
- name: Run Optimism e2e send (Chrome)
id: ChromeOpE2ESend
continue-on-error: true
uses: nick-fields/retry@v2
with:
timeout_minutes: 25
max_attempts: 2
command: |
export BROWSER=chrome
export OS=linux
export CHROMIUM_BIN=$(find chrome -type f -name 'chrome')
yarn vitest:send:optimism --retry=5
run: |
export BROWSER=chrome
export OS=linux
export CHROMIUM_BIN=$(find chrome -type f -name 'chrome')
yarn vitest:send:optimism
- name: Upload deps artifacts
if: steps.ChromeOpE2ESend.outcome == 'failure'
uses: actions/upload-artifact@v3
Expand All @@ -346,15 +322,11 @@ jobs:
- name: Run e2e dappInteractions (Chrome)
id: ChromeE2EDappInteractions
continue-on-error: true
uses: nick-fields/retry@v2
with:
timeout_minutes: 25
max_attempts: 2
command: |
export BROWSER=chrome
export OS=linux
export CHROMIUM_BIN=$(find chrome -type f -name 'chrome')
yarn vitest:dappInteractions --retry=5
run: |
export BROWSER=chrome
export OS=linux
export CHROMIUM_BIN=$(find chrome -type f -name 'chrome')
yarn vitest:dappInteractions
- name: Upload deps artifacts
if: steps.ChromeE2EDappInteractions.outcome == 'failure'
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -412,15 +384,11 @@ jobs:
# - name: Copy dotenv
# run: cat tmp/dotenv >> .env && rm -rf tmp
# - name: Run e2e (Brave)
# uses: nick-fields/retry@v2
# with:
# timeout_minutes: 18
# max_attempts: 3
# command: |
# export BROWSER=brave
# export OS=linux
# export BRAVE_BIN='/usr/bin/brave-browser-stable'
# yarn vitest:parallel && yarn vitest:serial
# run: |
# export BROWSER=brave
# export OS=linux
# export BRAVE_BIN='/usr/bin/brave-browser-stable'
# yarn vitest:parallel && yarn vitest:serial
# UNIT TESTS
unit-tests:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -457,11 +425,7 @@ jobs:
- name: Copy dotenv
run: cat tmp/dotenv >> .env && rm -rf tmp
- name: Run unit tests
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 3
command: yarn test
run: yarn test

# LINT, TYPECHECK, AUDIT
ci-checks:
Expand Down
63 changes: 63 additions & 0 deletions CHANGELOG.md
Expand Up @@ -21,6 +21,69 @@ and this project adheres to [Semantic Versioning](http://semver.org/)

### Testing

## [v1.4.55](https://github.com/rainbow-me/browser-extension/releases/tag/v1.4.55)

### Fixed

- Fixed an issue with balance estimation during Sends on Polygon and BSC #1472
- Now showing the right transaction explorer in the right-click menu on Activity #1419
- Fixed an issue that hid failed transactions from the Activity list #1419
- Resolved transaction display settlement issues after performing a Swap, to prevent incorrect transaction types from being displayed #1419
- Improved currency display values in Activity Details for each transaction #1419
- Resolved cell highlight rounding issues on the Settings menu when navigating with your keyboard #1464
- Resolved missing asset icons in the Activity list #1468

### Internal

- Amended Zora RPC url to favor new domain #1466
- Added a migration to remove Custom RPCs added by Zora.co #1467 #1475

### Testing

- Fixed test retries by moving retry logic to the runner scripts #1456

## [v1.4.50](https://github.com/rainbow-me/browser-extension/releases/tag/v1.4.50)

### Fixed

- Resolved an issue where network requests for Custom RPCs and Custom Networks were failing #1465

### Internal

- Bumped `@rainbow-me/swaps` for future DEGEN chain Swap and Bridge support #1462
- Added DeFi Positions networking requests and data handlers #1439

### Testing

- Adopted Telos Tesnet for e2e Custom Networks tests because the Polygon zkEVM Testnet was unresponsive #1463

## [v1.4.48](https://github.com/rainbow-me/browser-extension/releases/tag/v1.4.48)

### Added

- Added support for Polygon Amoy testnet #1443

### Changed

- Added `ETH` and `USDB` as default favorite assets for Blast #1448
- Reduced filtering of assets for the Swap search to ensure broader asset coverage for networks like Blast #1453

### Fixed

- Wallet balances will now display the correct balance after a token is hidden #1455
- Fixed Swaps gas estimation for Blast network #1447
- Resolved an issue that could cause the Connect Banner for dApps to appear on the lock screen #1424
- Fixed a console error related to fetching an undefined image URL #1458

### Internal

- Included refactors to unique asset ids (which were previously reverted) #1421
- Resolved an unreleased issue related to #1421 that would cause activity parsing to fail #1452
- Added `defi_positions_enabled` feature flag for DeFi Positions work #1440
- Modified RPC requests to the RPC Proxy to ensure that `custom_rpc` flag is used correctly so that we favor the default Rainbow RPC where possible #1444
- Resolved a Firebase networking error related to incorrectly fetching the Remote Config inside the background script #1457
- Bumped `vitest` to resolve audit failure #1460

## [v1.4.41](https://github.com/rainbow-me/browser-extension/releases/tag/v1.4.41)

### Added
Expand Down
3 changes: 3 additions & 0 deletions e2e/parallel/shortcuts-walletSwitcher.test.ts
Expand Up @@ -10,6 +10,7 @@ import {
findElementById,
findElementByTestId,
findElementByText,
findElementByTextAndClick,
getExtensionIdByName,
getRootUrl,
importWalletFlowUsingKeyboardNavigation,
Expand Down Expand Up @@ -82,6 +83,8 @@ describe.runIf(browser !== 'firefox')(
await executePerformShortcut({ driver, key: 'TAB', timesToPress: 2 });
await executePerformShortcut({ driver, key: 'ENTER' });
await checkExtensionURL(driver, 'wallet-switcher');
// need this to unfocus search field on slow running tests
await findElementByTextAndClick(driver, 'wallets');
await executePerformShortcut({ driver, key: 'ESCAPE' });
});

Expand Down
19 changes: 7 additions & 12 deletions e2e/serial/send/3_customNetworks.test.ts
Expand Up @@ -104,11 +104,11 @@ it('should be able to add a custom network', async () => {
id: 'add-custom-network-button',
});

const fujiChain = await findElementByTestId({
const cronos = await findElementByTestId({
id: 'network-row-25',
driver,
});
expect(fujiChain).toBeTruthy();
expect(cronos).toBeTruthy();
});

it('should be able to add a custom testnet network', async () => {
Expand All @@ -117,19 +117,14 @@ it('should be able to add a custom testnet network', async () => {
await findElementByTestIdAndClick({ driver, id: 'network-name-field' });

// fill out custom network form
await typeOnTextInput({ text: 'Polygon zkEVM Testnet', driver });
await typeOnTextInput({ text: 'Telos EVM Testnet', driver });
await executePerformShortcut({ driver, key: 'TAB' });
await typeOnTextInput({
text: 'https://rpc.public.zkevm-test.net',
text: 'https://testnet.telos.net/evm',
driver,
});
await executePerformShortcut({ driver, key: 'TAB' });
await typeOnTextInput({ text: 'ETH', driver });
await executePerformShortcut({ driver, key: 'TAB' });
await typeOnTextInput({
text: 'https://testnet-zkevm.polygonscan.com/',
driver,
});
await findElementByTestIdAndClick({ driver, id: 'testnet-toggle' });

// needs a couple seconds to validate the custom RPC
Expand All @@ -140,11 +135,11 @@ it('should be able to add a custom testnet network', async () => {
id: 'add-custom-network-button',
});

const cronosChain = await findElementByTestId({
id: 'network-row-1442',
const telos = await findElementByTestId({
id: 'network-row-41',
driver,
});
expect(cronosChain).toBeTruthy();
expect(telos).toBeTruthy();
});

it('should be able to add a custom ETH RPC and switch to it', async () => {
Expand Down
6 changes: 3 additions & 3 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "browser-extension",
"license": "GPL-3.0-only",
"version": "1.4.47",
"version": "1.4.57",
"scripts": {
"//enable dev mode": "",
"devmode:on": "sed -i'' -e 's/IS_DEV.*/IS_DEV=true/g' .env",
Expand Down Expand Up @@ -57,7 +57,7 @@
"test": "./scripts/unit-tests.sh",
"test:watch": "yarn anvil & vitest --watch",
"// Runs e2e": "",
"vitest:parallel": "yarn vitest e2e/parallel --config ./e2e/parallel/vitest.config.ts --bail 1",
"vitest:parallel": "./scripts/e2e-parallel-tests.sh",
"vitest:serial": "./scripts/e2e-serial-tests.sh",
"vitest:swap": "./scripts/e2e-serial-tests.sh 'swap'",
"vitest:send": "./scripts/e2e-serial-tests.sh 'send'",
Expand Down Expand Up @@ -103,7 +103,7 @@
"@radix-ui/react-tabs": "1.0.4",
"@radix-ui/react-tooltip": "1.0.3",
"@rainbow-me/provider": "0.0.7",
"@rainbow-me/swaps": "0.13.0",
"@rainbow-me/swaps": "0.15.0",
"@rudderstack/analytics-js-service-worker": "3.0.6",
"@scure/bip39": "1.2.1",
"@sentry/browser": "7.69.0",
Expand Down

0 comments on commit 0a91cf7

Please sign in to comment.