Skip to content

Commit

Permalink
Release @argent-x/[email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
gergold committed Mar 21, 2024
1 parent 9e4907d commit 0607c5e
Show file tree
Hide file tree
Showing 1,312 changed files with 11,851 additions and 27,776 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/amplitude.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Ampli Implementation Check
on: pull_request

jobs:
build:
runs-on: ubuntu-latest
container:
image: amplitudeinc/ampli
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Verify analytics implementation and update status in Data
run: ampli status -t ${{secrets.AMPLI_TOKEN}} [--update]
2 changes: 1 addition & 1 deletion .github/workflows/changeset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Chromatic

on:
push:
branches:
- develop
pull_request:

jobs:
chromatic:
env:
SAFE_ENV_VARS: true
ARGENT_API_BASE_URL: ${{ vars.ARGENT_API_BASE_URL }}
ARGENT_TESTNET_RPC_URL: ${{ vars.ARGENT_TESTNET_RPC_URL }}
ARGENT_HEALTHCHECK_BASE_URL: ${{ vars.ARGENT_HEALTHCHECK_BASE_URL }}
ARGENT_X_STATUS_URL: ${{ vars.ARGENT_X_STATUS_URL }}
ARGENT_X_NEWS_URL: ${{ vars.ARGENT_X_NEWS_URL }}
ARGENT_X_ENVIRONMENT: "prod"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Setup project
run: pnpm run setup

- name: Publish to Chromatic
uses: chromaui/action@latest
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
workingDir: packages/storybook
109 changes: 95 additions & 14 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
Expand All @@ -101,7 +101,7 @@ jobs:
run: pnpm bundlewatch

- name: Use Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ./*
key: ${{ github.sha }}-${{ matrix.extension_type }}-${{ matrix.env }}
Expand Down Expand Up @@ -158,15 +158,15 @@ jobs:
cache: "pnpm"

- name: Restore pnpm cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Restore cached build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ./*
key: ${{ github.sha }}-chrome-hydrogen # test-unit is always run against chrome-hydrogen build
Expand Down Expand Up @@ -199,6 +199,7 @@ jobs:
E2E_TESTNET_SEED1: ${{ secrets.E2E_TESTNET_SEED1 }}
E2E_TESTNET_SEED2: ${{ secrets.E2E_TESTNET_SEED2 }}
E2E_TESTNET_SEED3: ${{ secrets.E2E_TESTNET_SEED3 }}
E2E_TESTNET_SEED4: ${{ secrets.E2E_TESTNET_SEED4 }}
E2E_ACCOUNT_1_SEED2: ${{ secrets.E2E_ACCOUNT_1_SEED2 }}
E2E_ACCOUNT_1_SEED3: ${{ secrets.E2E_ACCOUNT_1_SEED3 }}
## BANK ACCOUNT, USED FOR FUND OTHER ACCOUNTS
Expand All @@ -211,12 +212,19 @@ jobs:
ARGENT_HEALTHCHECK_BASE_URL: ${{ secrets.ARGENT_HEALTHCHECK_BASE_URL }}
E2E_SPOK_CAMPAIGN_URL: ${{ secrets.E2E_SPOK_CAMPAIGN_URL }}
E2E_SPOK_CAMPAIGN_NAME: ${{ secrets.E2E_SPOK_CAMPAIGN_NAME }}
##slack config
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
# Refresh intervals
REFRESH_INTERVAL_FAST: 1 # 1s
REFRESH_INTERVAL_MEDIUM: 5 # 5s
REFRESH_INTERVAL_SLOW: 20 # 20s
REFRESH_INTERVAL_VERY_SLOW: 60 * 10 # 10m

##webwallet default account config
WW_EMAIL: ${{ secrets.WW_EMAIL }}
WW_PIN: ${{ secrets.WW_PIN }}
WW_LOGIN_PASSWORD: ${{ secrets.WW_LOGIN_PASSWORD }}
steps:
- uses: actions/checkout@v4

Expand All @@ -233,15 +241,15 @@ jobs:
cache: "pnpm"

- name: Restore pnpm cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Restore cached build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ./*
key: ${{ github.sha }}-chrome-${{ env.ARGENT_X_ENVIRONMENT }} # test-e2e is always run against chrome-hydrogen build
Expand Down Expand Up @@ -270,6 +278,70 @@ jobs:
path: packages/e2e/blob-report/
retention-days: 5

test-notify-low-balance:
runs-on: ubuntu-latest
if: always()
needs: [build-all-artifacts, test-e2e]
env:
ARGENT_X_ENVIRONMENT: "hydrogen"
ARGENT_API_BASE_URL: ${{ secrets.ARGENT_API_BASE_URL }}
E2E_TESTNET_SEED1: ${{ secrets.E2E_TESTNET_SEED1 }}
E2E_TESTNET_SEED2: ${{ secrets.E2E_TESTNET_SEED2 }}
E2E_TESTNET_SEED3: ${{ secrets.E2E_TESTNET_SEED3 }}
E2E_TESTNET_SEED4: ${{ secrets.E2E_TESTNET_SEED4 }}
E2E_ACCOUNT_1_SEED2: ${{ secrets.E2E_ACCOUNT_1_SEED2 }}
E2E_ACCOUNT_1_SEED3: ${{ secrets.E2E_ACCOUNT_1_SEED3 }}
## BANK ACCOUNT, USED FOR FUND OTHER ACCOUNTS
E2E_SENDER_ADDRESSES: ${{ secrets.E2E_SENDER_ADDRESSES }}
E2E_SENDER_PRIVATEKEYS: ${{ secrets.E2E_SENDER_PRIVATEKEYS }}
E2E_SENDER_SEED: ${{ secrets.E2E_SENDER_SEED }}
STARKNET_TESTNET_URL: ${{ secrets.STARKNET_TESTNET_URL }}
STARKSCAN_TESTNET_URL: ${{ secrets.STARKSCAN_TESTNET_URL }}
ARGENT_TESTNET_RPC_URL: ${{ secrets.ARGENT_TESTNET_RPC_URL }}
ARGENT_HEALTHCHECK_BASE_URL: ${{ secrets.ARGENT_HEALTHCHECK_BASE_URL }}
E2E_SPOK_CAMPAIGN_URL: ${{ secrets.E2E_SPOK_CAMPAIGN_URL }}
E2E_SPOK_CAMPAIGN_NAME: ${{ secrets.E2E_SPOK_CAMPAIGN_NAME }}
##slack config
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
# Refresh intervals
REFRESH_INTERVAL_FAST: 1 # 1s
REFRESH_INTERVAL_MEDIUM: 5 # 5s
REFRESH_INTERVAL_SLOW: 20 # 20s
REFRESH_INTERVAL_VERY_SLOW: 60 * 10 # 10m

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false

- uses: actions/setup-node@v4
with:
node-version: "18.x"
cache: "pnpm"

- name: Restore pnpm cache
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Restore cached build
uses: actions/cache@v4
with:
path: ./*
key: ${{ github.sha }}-chrome-${{ env.ARGENT_X_ENVIRONMENT }} # test-e2e is always run against chrome-hydrogen build

- name: Slack notifications
run: pnpm run test:e2e:slack-notifications

merge-reports:
needs: [test-e2e, test-webwallet]
if: always()
Expand All @@ -291,7 +363,7 @@ jobs:
cache: "pnpm"

- name: Restore pnpm cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
Expand Down Expand Up @@ -336,7 +408,7 @@ jobs:
cache: "pnpm"

- name: Restore pnpm cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
Expand Down Expand Up @@ -376,7 +448,7 @@ jobs:
cache: "pnpm"

- name: Restore cached build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ./*
key: ${{ github.sha }}-chrome-hydrogen
Expand Down Expand Up @@ -426,6 +498,7 @@ jobs:
E2E_TESTNET_SEED1: ${{ secrets.E2E_TESTNET_SEED1 }}
E2E_TESTNET_SEED2: ${{ secrets.E2E_TESTNET_SEED2 }}
E2E_TESTNET_SEED3: ${{ secrets.E2E_TESTNET_SEED3 }}
E2E_TESTNET_SEED4: ${{ secrets.E2E_TESTNET_SEED4 }}
E2E_ACCOUNT_1_SEED2: ${{ secrets.E2E_ACCOUNT_1_SEED2 }}
E2E_ACCOUNT_1_SEED3: ${{ secrets.E2E_ACCOUNT_1_SEED3 }}
## BANK ACCOUNT, USED FOR FUND OTHER ACCOUNTS
Expand All @@ -438,6 +511,14 @@ jobs:
ARGENT_HEALTHCHECK_BASE_URL: ${{ secrets.ARGENT_HEALTHCHECK_BASE_URL }}
E2E_SPOK_CAMPAIGN_URL: ${{ secrets.E2E_SPOK_CAMPAIGN_URL }}
E2E_SPOK_CAMPAIGN_NAME: ${{ secrets.E2E_SPOK_CAMPAIGN_NAME }}
##slack config
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}

##webwallet default account config
WW_EMAIL: ${{ secrets.WW_EMAIL }}
WW_PIN: ${{ secrets.WW_PIN }}
WW_LOGIN_PASSWORD: ${{ secrets.WW_LOGIN_PASSWORD }}

steps:
- uses: actions/checkout@v4
Expand All @@ -455,7 +536,7 @@ jobs:
cache: "pnpm"

- name: Restore cached build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ./*
key: ${{ github.sha }}
Expand All @@ -477,7 +558,7 @@ jobs:
uses: actions/upload-artifact@v4
if: always()
with:
name: test-artifacts-${{ matrix.shardIndex }}
name: test-artifacts-webwallet
path: |
packages/e2e/artifacts/playwright/
retention-days: 5
Expand All @@ -486,7 +567,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
name: all-blob-reports-webwallet-${{ matrix.shardIndex }}
name: all-blob-reports-webwallet-webwallet
path: packages/e2e/blob-report/
retention-days: 5

Expand All @@ -497,7 +578,7 @@ jobs:

steps:
- name: Send notification to Slack
uses: 8398a7/action-slack@v3.15.1
uses: 8398a7/action-slack@v3.16.2
with:
status: custom
custom_payload: |
Expand All @@ -506,7 +587,7 @@ jobs:
attachments: [{
fallback: 'fallback',
color: '${{ env.BUILD_STATUS }}',
title: 'Artifacts for testing ${{ env.BUILD_TYPE }} <${{ github.server_url }}/${{ github.repository }}/pull/${{ github.event.number }}|${{ github.event.number }} ${{ github.event.pull_request.title }}>',
title: `Artifacts for testing ${{ env.BUILD_TYPE }} <${{ github.server_url }}/${{ github.repository }}/pull/${{ github.event.number }}|${{ github.event.number }} ${{ github.event.pull_request.title }}>`,
text: '<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}#artifacts|Artifacts link>',
fields: [{},],
actions: [{}]}]
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.11.0
20.11.1
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"vitest.enable": true,
"vitest.commandLine": "npx vitest -r packages/extension/",
"explorer.fileNesting.patterns": {
"*.tsx": "${capture}.ts, ${capture}.typegen.ts, ${capture}Container.tsx, ${capture}.container.tsx, ${capture}.test.tsx, ${capture}.spec.tsx, ${capture}.test.ts, ${capture}.spec.ts",
"*.tsx": "${capture}.ts, ${capture}.typegen.ts, ${capture}Container.tsx, ${capture}.container.tsx, ${capture}.stories.tsx, ${capture}.test.tsx, ${capture}.spec.tsx, ${capture}.test.ts, ${capture}.spec.ts",
"*.ts": "${capture}.ts, ${capture}.typegen.ts, ${capture}Container.tsx, ${capture}.container.tsx, ${capture}.test.tsx, ${capture}.spec.tsx, ${capture}.test.ts, ${capture}.spec.ts"
}
}
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"@lavamoat/allow-scripts": "^3.0.0",
"@lavamoat/preinstall-always-fail": "^2.0.0",
"bundlewatch": "^0.3.3",
"husky": "^8.0.3",
"husky": "^9.0.0",
"import-sort-style-module": "^6.0.0",
"lint-staged": "^15.0.0",
"nx": "^17.0.0",
"nx": "^18.0.0",
"patch-package": "^8.0.0",
"prettier": ">=2.8.8",
"prettier": "^3.2.5",
"prettier-plugin-import-sort": "^0.0.7",
"ts-node": "^10.9.1"
},
Expand All @@ -38,6 +38,7 @@
"test:watch": "pnpm run -r --parallel; --stream test:watch",
"test:e2e:extension": "pnpm run --filter @argent-x/e2e test:extension",
"test:e2e:webwallet": "pnpm run --filter @argent-x/e2e test:webwallet",
"test:e2e:slack-notifications": "pnpm run --filter @argent-x/e2e test:slack-notifications",
"setup": "pnpm install --frozen-lockfile && pnpm allow-scripts && husky install && patch-package && pnpm run -r --stream setup",
"test:ci": "pnpm run --stream --parallel test:ci",
"storybook": "cd packages/storybook && pnpm run storybook",
Expand Down
12 changes: 6 additions & 6 deletions packages/dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"lint": "next lint"
},
"dependencies": {
"@argent/shared": "^6.3.1",
"@argent/ui": "^6.3.1",
"@argent/x-shared": "1.1.7",
"@argent/x-ui": "^1.0.2",
"@argent/x-sessions": "^6.3.1",
"@chakra-ui/react": "^2.6.1",
"@starknet-react/chains": "0.1.5",
"@starknet-react/core": "2.2.2",
"@chakra-ui/react": "^2.8.2",
"@starknet-react/chains": "0.1.7",
"@starknet-react/core": "2.2.5",
"micro-starknet": "^0.2.3",
"next": "^13.4.6",
"react": "^18.0.0",
Expand All @@ -24,7 +24,7 @@
"starknetkit": "^1.1.0"
},
"devDependencies": {
"@types/node": "20.11.0",
"@types/node": "20.11.20",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"eslint": "8",
Expand Down
2 changes: 1 addition & 1 deletion packages/dapp/src/components/AddNetwork.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { H2 } from "@argent/ui"
import { H2 } from "@argent/x-ui"
import { Flex } from "@chakra-ui/react"
import { addNetwork } from "../services/wallet.service"
import { useState } from "react"
Expand Down
Loading

0 comments on commit 0607c5e

Please sign in to comment.