Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jan 3, 2025
2 parents a1468a0 + 8b89cec commit ee7bf25
Show file tree
Hide file tree
Showing 17 changed files with 86 additions and 22 deletions.
29 changes: 27 additions & 2 deletions .github/actions/analyze-comment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ runs:
steps:
- name: Download PR bundle stats
if: github.event.workflow_run.id
continue-on-error: true
uses: dawidd6/action-download-artifact@ea71f332a90fd52416b1629b933dcf7e0ccd421d # v2.22.0
with:
workflow: build-fork.yml
Expand All @@ -32,16 +33,40 @@ runs:
- name: Download base branch bundle stats
uses: dawidd6/action-download-artifact@ea71f332a90fd52416b1629b933dcf7e0ccd421d # v2.22.0
if: github.event_name != 'push'
continue-on-error: true
with:
workflow: build-test-deploy.yml
branch: main
name: bundle
path: .next/analyze/base/bundle/

- name: Compare with base branch bundle
- name: Handle missing bundle
if: github.event_name != 'push'
shell: bash
run: |
if [ ! -d ".next/analyze/base/bundle" ]; then
echo "No base bundle found, creating baseline"
mkdir -p .next/analyze/base/bundle
if [ -f ".next/analyze/__bundle_analysis.json" ]; then
cp .next/analyze/__bundle_analysis.json .next/analyze/base/bundle/
echo "Baseline bundle created successfully"
else
echo "Warning: Source bundle analysis file not found"
echo "{}" > .next/analyze/base/bundle/__bundle_analysis.json
echo "Created empty baseline bundle"
fi
fi
- name: Compare with base branch bundle
if: github.event_name != 'push' && !contains(github.ref, 'main')
shell: sh
run: ls -laR .next/analyze/base && npx -p nextjs-bundle-analysis compare
run: |
if [ -d ".next/analyze/base/bundle" ]; then
ls -laR .next/analyze/base && npx -p nextjs-bundle-analysis compare
else
echo "No base bundle found for comparison. Skipping comparison step."
cp .next/analyze/__bundle_analysis.json .next/analyze/__bundle_analysis_comment.txt
fi
- name: Get comment body
id: get-comment-body
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/cypress/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ runs:
if: github.event_name != 'workflow_run'
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0
with:
name: out
name: out_cypress
path: out

- name: Download static build
Expand All @@ -41,7 +41,7 @@ runs:
workflow: build-fork.yml
run_id: ${{ github.event.workflow_run.id }}
workflow_conclusion: success
name: out
name: out_cypress
path: out

- name: test
Expand Down
3 changes: 0 additions & 3 deletions .github/actions/upload-artifacts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@ runs:
name: pr
path: __pr/
retention-days: 10

- name: store static build
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0
with:
name: '${{ inputs.BUILD_ARTIFACT_NAME }}'
path: out/
retention-days: 10

- name: store nextjs build
if: inputs.NEXTJS_BUILD == 'true'
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0
Expand All @@ -46,4 +44,3 @@ runs:
.next
!.next/cache
retention-days: 10

11 changes: 9 additions & 2 deletions .github/workflows/build-test-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ jobs:
(github.event_name == 'push' && github.event_name == 'pull_request') ||
(github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name &&
!contains(github.head_ref, 'dependabot'))
strategy:
matrix:
build:
- name: 'out'
cypress_enabled: 'false'
- name: 'out_cypress'
cypress_enabled: 'true'
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
with:
Expand All @@ -31,12 +38,12 @@ jobs:
NEXT_PUBLIC_FIAT_ON_RAMP: 'false'
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
NEXT_PUBLIC_SUBGRAPH_API_KEY: ${{ secrets.NEXT_PUBLIC_SUBGRAPH_API_KEY }}
NEXT_PUBLIC_IS_CYPRESS_ENABLED: 'true'
NEXT_PUBLIC_IS_CYPRESS_ENABLED: ${{ matrix.build.cypress_enabled }}

- name: Upload artifacts
uses: ./.github/actions/upload-artifacts
with:
BUILD_ARTIFACT_NAME: 'out'
BUILD_ARTIFACT_NAME: ${{ matrix.build.name }}

cypress_smoke_v2:
runs-on: ubuntu-latest
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ jobs:
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
(github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name &&
!contains(github.head_ref, 'dependabot'))
strategy:
matrix:
build:
- name: 'out'
cypress_enabled: 'false'
- name: 'out_cypress'
cypress_enabled: 'true'
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
with:
Expand All @@ -31,12 +38,12 @@ jobs:
NEXT_PUBLIC_FIAT_ON_RAMP: 'false'
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
NEXT_PUBLIC_SUBGRAPH_API_KEY: ${{ secrets.NEXT_PUBLIC_SUBGRAPH_API_KEY }}
NEXT_PUBLIC_IS_CYPRESS_ENABLED: 'false'
NEXT_PUBLIC_IS_CYPRESS_ENABLED: ${{ matrix.build.cypress_enabled }}

- name: Upload artifacts
uses: ./.github/actions/upload-artifacts
with:
BUILD_ARTIFACT_NAME: 'out'
BUILD_ARTIFACT_NAME: ${{ matrix.build.name }}

build_staging:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -114,7 +121,7 @@ jobs:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2

- name: download build
uses: actions/download-artifact@v4.1.8 # v3.0.0
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0
with:
name: nextjs_build
path: .next
Expand All @@ -137,7 +144,7 @@ jobs:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2

- name: download build
uses: actions/download-artifact@v4.1.8 # v3.0.0
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0
with:
name: out
path: out
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-prod-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2

- name: download build
uses: actions/download-artifact@v4.1.8 # v3.0.0
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0
with:
name: ${{ matrix.environment.artifact }}
path: ${{ matrix.environment.build_path }}
Expand Down
1 change: 1 addition & 0 deletions public/icons/tokens/ausd.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/layouts/MobileMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
Typography,
} from '@mui/material';
import React, { ReactNode, useEffect, useState } from 'react';
import { useModalContext } from 'src/hooks/useModal';
import { PROD_ENV } from 'src/utils/marketsAndNetworksConfig';

import { Link } from '../components/primitives/Link';
Expand Down Expand Up @@ -47,9 +48,15 @@ const MenuItemsWrapper = ({ children, title }: { children: ReactNode; title: Rea
export const MobileMenu = ({ open, setOpen, headerHeight }: MobileMenuProps) => {
const { i18n } = useLingui();
const [isLanguagesListOpen, setIsLanguagesListOpen] = useState(false);
const { openReadMode } = useModalContext();

useEffect(() => setIsLanguagesListOpen(false), [open]);

const handleOpenReadMode = () => {
setOpen(false);
openReadMode();
};

return (
<>
{open ? (
Expand Down Expand Up @@ -82,6 +89,11 @@ export const MobileMenu = ({ open, setOpen, headerHeight }: MobileMenuProps) =>
</MenuItemsWrapper>
<MenuItemsWrapper title={<Trans>Links</Trans>}>
<List>
<ListItem sx={{ cursor: 'pointer', color: '#F1F1F3' }} onClick={handleOpenReadMode}>
<ListItemText>
<Trans>Watch wallet</Trans>
</ListItemText>
</ListItem>
<ListItem
sx={{ color: '#F1F1F3' }}
component={Link}
Expand Down
3 changes: 2 additions & 1 deletion src/locales/de/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Language: de\n"
"Project-Id-Version: aave-interface\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-01-02 18:06\n"
"PO-Revision-Date: 2025-01-03 12:08\n"
"Last-Translator: \n"
"Language-Team: German\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
Expand Down Expand Up @@ -769,6 +769,7 @@ msgstr "Bitte verbinden Sie Ihre Wallet, um das Migrationstool anzuzeigen."
msgid "{networkName} Faucet"
msgstr "{networkName} Hahn"

#: src/layouts/MobileMenu.tsx
#: src/layouts/SettingsMenu.tsx
msgid "Watch wallet"
msgstr ""
Expand Down
3 changes: 2 additions & 1 deletion src/locales/el/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Language: el\n"
"Project-Id-Version: aave-interface\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-01-02 18:06\n"
"PO-Revision-Date: 2025-01-03 12:08\n"
"Last-Translator: \n"
"Language-Team: Greek\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
Expand Down Expand Up @@ -770,6 +770,7 @@ msgstr ""
msgid "{networkName} Faucet"
msgstr "{networkName} Βρύση"

#: src/layouts/MobileMenu.tsx
#: src/layouts/SettingsMenu.tsx
msgid "Watch wallet"
msgstr ""
Expand Down
1 change: 1 addition & 0 deletions src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,7 @@ msgstr "Please connect your wallet to see migration tool."
msgid "{networkName} Faucet"
msgstr "{networkName} Faucet"

#: src/layouts/MobileMenu.tsx
#: src/layouts/SettingsMenu.tsx
msgid "Watch wallet"
msgstr "Watch wallet"
Expand Down
3 changes: 2 additions & 1 deletion src/locales/es/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Language: es\n"
"Project-Id-Version: aave-interface\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-01-02 18:06\n"
"PO-Revision-Date: 2025-01-03 12:08\n"
"Last-Translator: \n"
"Language-Team: Spanish\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
Expand Down Expand Up @@ -769,6 +769,7 @@ msgstr "Por favor conecta tu cartera para ver la herramienta de migración."
msgid "{networkName} Faucet"
msgstr "Faucet {networkName}"

#: src/layouts/MobileMenu.tsx
#: src/layouts/SettingsMenu.tsx
msgid "Watch wallet"
msgstr ""
Expand Down
3 changes: 2 additions & 1 deletion src/locales/fr/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Language: fr\n"
"Project-Id-Version: aave-interface\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-01-02 18:06\n"
"PO-Revision-Date: 2025-01-03 12:08\n"
"Last-Translator: \n"
"Language-Team: French\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
Expand Down Expand Up @@ -769,6 +769,7 @@ msgstr "Veuillez connecter votre portefeuille pour voir l’outil de migration."
msgid "{networkName} Faucet"
msgstr "{networkName} Robinet"

#: src/layouts/MobileMenu.tsx
#: src/layouts/SettingsMenu.tsx
msgid "Watch wallet"
msgstr ""
Expand Down
3 changes: 2 additions & 1 deletion src/locales/ru/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Language: ru\n"
"Project-Id-Version: aave-interface\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-01-02 18:06\n"
"PO-Revision-Date: 2025-01-03 12:08\n"
"Last-Translator: \n"
"Language-Team: Russian\n"
"Plural-Forms: nplurals=4; plural=((n%10==1 && n%100!=11) ? 0 : ((n%10 >= 2 && n%10 <=4 && (n%100 < 12 || n%100 > 14)) ? 1 : ((n%10 == 0 || (n%10 >= 5 && n%10 <=9)) || (n%100 >= 11 && n%100 <= 14)) ? 2 : 3));\n"
Expand Down Expand Up @@ -769,6 +769,7 @@ msgstr "Пожалуйста, подключите свой кошелек, чт
msgid "{networkName} Faucet"
msgstr "{networkName} Водопроводный кран"

#: src/layouts/MobileMenu.tsx
#: src/layouts/SettingsMenu.tsx
msgid "Watch wallet"
msgstr ""
Expand Down
3 changes: 2 additions & 1 deletion src/locales/zh/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Language: zh\n"
"Project-Id-Version: aave-interface\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-01-02 18:06\n"
"PO-Revision-Date: 2025-01-03 12:08\n"
"Last-Translator: \n"
"Language-Team: Chinese Simplified\n"
"Plural-Forms: nplurals=1; plural=0;\n"
Expand Down Expand Up @@ -769,6 +769,7 @@ msgstr "请连接您的钱包以查看迁移工具。"
msgid "{networkName} Faucet"
msgstr "{networkName} 龙头"

#: src/layouts/MobileMenu.tsx
#: src/layouts/SettingsMenu.tsx
msgid "Watch wallet"
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion src/ui-config/networksConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const networkConfigs: Record<string, BaseNetworkConfig> = {
'https://rpc.ankr.com/eth',
'https://rpc.flashbots.net',
'https://eth-mainnet.public.blastapi.io',
'https://cloudflare-eth.com/v1/mainnet',
//'https://cloudflare-eth.com/v1/mainnet',
],
publicJsonRPCWSUrl: 'wss://eth-mainnet.alchemyapi.io/v2/demo',
baseUniswapAdapter: '0xc3efa200a60883a96ffe3d5b492b121d6e9a1f3f',
Expand Down
10 changes: 9 additions & 1 deletion src/ui-config/wagmiConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
networkConfigs,
} from 'src/utils/marketsAndNetworksConfig';
import { type Chain } from 'viem';
import { createConfig, CreateConfigParameters, injected } from 'wagmi';
import { createConfig, CreateConfigParameters, http, injected } from 'wagmi';
import {
arbitrum,
arbitrumSepolia,
Expand Down Expand Up @@ -88,9 +88,17 @@ const cypressConfig = createConfig(
})
);

const getTransport = (chainId: number) => {
return networkConfigs[chainId].publicJsonRPCUrl[0];
};

const buildTransports = (chains: CreateConfigParameters['chains']) =>
Object.fromEntries(chains.map((chain) => [chain.id, http(getTransport(chain.id))]));

const prodConfig = createConfig(
getDefaultConfig({
chains: ENABLE_TESTNET ? testnetChains : prodChains,
transports: ENABLE_TESTNET ? undefined : buildTransports(prodChains),
...defaultConfig,
})
);
Expand Down

0 comments on commit ee7bf25

Please sign in to comment.