Skip to content

Commit

Permalink
Merge branch 'argentlabs:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
clexmond authored Mar 13, 2024
2 parents 3e3f7ad + 099b229 commit 725bd54
Show file tree
Hide file tree
Showing 214 changed files with 12,937 additions and 7,597 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/chromatic.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/dependabot.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
if: github.actor != 'dependabot[bot]'
steps:
- uses: actions/checkout@v3

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ env:
FEATURE_BANXA: "true"
FEATURE_LAYERSWAP: "true"
FEATURE_ORBITER: "true"
FEATURE_VERIFIED_DAPPS: "false"
FEATURE_VERIFIED_DAPPS: "true"
FEATURE_ARGENT_SHIELD: "true"
ARGENT_SHIELD_NETWORK_ID: "mainnet-alpha"

jobs:
build:
Expand Down
41 changes: 27 additions & 14 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@ on:
push:
branches: [develop]
pull_request:
branches: [develop]
branches:
- main
- develop

jobs:
test:
runs-on: ubuntu-latest

services:
devnet:
image: shardlabs/starknet-devnet:latest-seed0
ports:
- 5050:5050
env:
FILENAME: argent-extension-${{ github.ref_name }}
FEATURE_PRIVACY_SETTINGS: "true"
Expand All @@ -28,17 +25,14 @@ jobs:
ARGENT_EXPLORER_BASE_URL: ${{ secrets.ARGENT_EXPLORER_BASE_URL }}

steps:
- name: If github.head_ref not filled, we are merging
run: |
if [ "${{ github.head_ref }}" == "" ]; then
echo "PUBLISH_COMMENT=no" >> $GITHUB_ENV
else
echo "PUBLISH_COMMENT=yes" >> $GITHUB_ENV
fi
- name: Check out repository code
uses: actions/checkout@v3

- name: Build starknet-devnet
run: docker build -f ./packages/extension/e2e/Dockerfile . --tag e2e-starknet-devnet:latest
- name: Run starknet-devnet
run: docker run -d -it --name devnet -p 5050:5050 e2e-starknet-devnet:latest

- uses: actions/setup-node@v3
with:
node-version: "16"
Expand All @@ -55,9 +49,28 @@ jobs:
env:
UPLOAD_SENTRY_SOURCEMAPS: false

- name: Check docker local network
run: |
CODE=`curl --write-out '%{http_code}' \
--silent \
--output /dev/null \
--request GET \
--url 'http://localhost:5050/is_alive' \
`
if [[ "$CODE" != "200" ]]
then
echo "Local network is offline! $CODE"
exit 1
else
echo "Local network is online."
fi
- name: Run e2e tests
run: xvfb-run --auto-servernum yarn test:e2e

- name: Stop starknet-devnet
run: docker stop devnet

- uses: actions/upload-artifact@v3
if: always()
with:
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ on:
push:
branches: [develop]
pull_request:
branches: [develop]
branches:
- main
- develop

jobs:
test:
Expand All @@ -30,7 +32,7 @@ jobs:
steps:
- name: If github.head_ref not filled, we are merging
run: |
if [ "${{ github.head_ref }}" == "" ]; then
if [ "${{ github.head_ref }}" == "" || ${{ github.actor == 'dependabot[bot]' }} ]; then
echo "PUBLISH_COMMENT=no" >> $GITHUB_ENV
else
echo "PUBLISH_COMMENT=yes" >> $GITHUB_ENV
Expand Down Expand Up @@ -122,13 +124,15 @@ jobs:

- name: comment PR
if: ${{ env.PUBLISH_COMMENT == 'yes' }}
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
INPUT_REPO: ${{ env.GHA_BRANCH }}
INPUT_OWNER: ${{ github.repository_owner }}
run: |
gh pr comment ${{ env.GHA_BRANCH }} --body "[Builds for local testing](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})"
- name: SonarCloud Scan
if: github.actor != 'dependabot[bot]'
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
8 changes: 4 additions & 4 deletions Deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ We automated some parts of the release process to make things easier. This file
- Check and ensure the previous release branch `release/vX.Y.Z` was merged into `main`
- Check and ensure `main` was back-merged into `develop`
- Check and ensure you are working in the latest `develop` branch
- Run `npx lerna version` - this will:
- update the `version` in each `package.json`
- Run `yarn run version` - this will:
- update the `version` in each `package.json` and `manifest.json`
- create branch `release/vX.Y.Z`
- create tag `vX.Y.Z`
- push the tagged branch automatically
- Pushing a tagged branch triggers a release build action in GitHub
- push the branch and tag automatically
- Pushing a tag triggers a release build action in GitHub
- Wait for pipeline to create release containing the extension zip
- If the automatic npm publish failed, do it manually (ask Gerald)
- Create GitHub pull request to merge the new branch `release/vX.Y.Z` into `main`
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"packages": ["packages/*"],
"version": "5.3.4",
"version": "5.3.17",
"npmClient": "yarn",
"useWorkspaces": true
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"test:ci": "lerna run test:ci --stream",
"storybook": "cd packages/storybook && yarn storybook",
"devnet:upgrade-helper": "NODE_NO_WARNINGS=1 ts-node ./scripts/devnet-upgrade-helper.ts",
"devnet:setup-contracts": "NODE_NO_WARNINGS=1 ts-node ./scripts/devnet-setup-contracts.ts"
"devnet:setup-contracts": "NODE_NO_WARNINGS=1 ts-node ./scripts/devnet-setup-contracts.ts",
"version": "lerna version --no-push --no-git-tag-version && yarn --cwd packages/extension run version"
},
"importSort": {
".js, .jsx, .ts, .tsx": {
Expand Down
10 changes: 5 additions & 5 deletions packages/dapp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@argent-x/dapp",
"version": "5.3.4",
"version": "5.3.17",
"private": true,
"scripts": {
"dev": "next dev",
Expand All @@ -10,8 +10,8 @@
"lint": "next lint"
},
"dependencies": {
"@argent/get-starknet": "^5.3.4",
"@argent/x-sessions": "^5.3.4",
"@argent/get-starknet": "^5.3.17",
"@argent/x-sessions": "^5.3.17",
"ethers": "^5.5.1",
"next": "^13.0.0",
"react": "^18.0.0",
Expand All @@ -20,11 +20,11 @@
"starknet5": "npm:[email protected]"
},
"devDependencies": {
"@types/node": "18.11.18",
"@types/node": "18.15.5",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"eslint": "8",
"eslint-config-next": "13.1.6",
"eslint-config-next": "13.2.3",
"typescript": "^4.9.4"
}
}
2 changes: 1 addition & 1 deletion packages/extension/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ ARGENT_X_STATUS_URL=
#FEATURE_ARGENT_SHIELD=
#ARGENT_SHIELD_NETWORK_ID=
#FEATURE_MULTISIG=
#FEATURE_VERIFIED_DAPPS=
#FEATURE_VERIFIED_DAPPS=
8 changes: 8 additions & 0 deletions packages/extension/e2e/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

FROM shardlabs/starknet-devnet:0.4.6
RUN addgroup -S localuser \
&& adduser -S localuser -G localuser

USER localuser
COPY ./packages/extension/e2e/network-setup /network-setup
ENTRYPOINT [ "starknet-devnet", "--host", "0.0.0.0", "--port", "5050", "--seed", "0", "--lite-mode", "--load-path", "/network-setup/dump.pkl" ]
Binary file added packages/extension/e2e/network-setup/dump.pkl
Binary file not shown.
26 changes: 26 additions & 0 deletions packages/extension/e2e/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,30 @@ export default {
artifactsDir: path.resolve(__dirname, "../artifacts/playwright"),
reportsDir: path.resolve(__dirname, "../artifacts/reports"),
distDir: path.join(__dirname, "../../dist/"),

wallets: [
{
// NOTE: Seed phrase is here intentionally and is used only for local testing. DO NOT use for any other purpose
seed: "dove luxury shield hill chronic radio used barely rifle brick author bounce",
accounts: [
// 0.9992 ETH, deployed
"0x0027A5C4b2Fe3D2F2623A9B9d91b73b53fBefba45087e572C22A27005a602B74",
// 2 ETH, not deployed
"0x03eC198B36781Bbb352ffa55c3E3b48F74C469da3495b6Bc211D87d61B9fDF7b",
],
},
{
// NOTE: Seed phrase is here intentionally and is used only for local testing. DO NOT use for any other purpose
seed: "muffin abandon fancy enhance neglect fit team biology loyal traffic ocean wash",
accounts: [
// 1 ETH, not deployed
"0x035508Aaf6C124D348686F31ca9981568F0c0d29b563a2Ecb045aA8C81334057",
],
},
{
// NOTE: Seed phrase is here intentionally and is used only for local testing. DO NOT use for any other purpose
seed: "slam water student cotton chalk okay auto police frown smart vague salon",
// 32 accounts
},
],
}
20 changes: 20 additions & 0 deletions packages/extension/e2e/src/languages/ILanguage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ export interface ILanguage {
lockWallet: string
reset: string
confirmReset: string
save: string
create: string
cancel: string
privacyStatement: string
}
account: {
noAccounts: string
Expand All @@ -25,6 +29,9 @@ export interface ILanguage {
export: string
accountRecovery: string
saveTheRecoveryPhrase: string
pendingTransactions: string
recipientAddress: string
saveAddress: string
}
wallet: {
//first screen
Expand Down Expand Up @@ -65,4 +72,17 @@ export interface ILanguage {
delete: string
copy: string
}
developerSettings: {
manageNetworks: string
blockExplorer: string
smartContractDevelopment: string
experimental: string
restoreDefaultNetworks: string
}
address: {
nameRequired: string
addressRequired: string
removeAddress: string
delete: string
}
}
21 changes: 21 additions & 0 deletions packages/extension/e2e/src/languages/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ const texts = {
lockWallet: "Lock wallet",
reset: "Reset",
confirmReset: "RESET",
save: "Save",
create: "Create",
cancel: "Cancel",
privacyStatement:
"GDPR statement for browser extension wallet: Argent takes the privacy and security of individuals very seriously and takes every reasonable measure and precaution to protect and secure the personal data that we process. The browser extension wallet does not collect any personal information nor does it correlate any of your personal information with anonymous data processed as part of its services. On top of this Argent has robust information security policies and procedures in place to make sure any processing complies with applicable laws. If you would like to know more or have any questions then please visit our website at https://www.argent.xyz/",
},
account: {
noAccounts: "You have no accounts on ",
Expand All @@ -25,6 +30,9 @@ const texts = {
export: "Export",
accountRecovery: "Set up account recovery",
saveTheRecoveryPhrase: "Save the recovery phrase",
pendingTransactions: "Pending transactions",
recipientAddress: "Recipient's address",
saveAddress: "Save address",
},
wallet: {
//first screen
Expand Down Expand Up @@ -68,6 +76,19 @@ const texts = {
delete: "Delete",
copy: "Copy",
},
developerSettings: {
manageNetworks: "Manage networks",
blockExplorer: "Block explorer",
smartContractDevelopment: "Smart Contract Development",
experimental: "Experimental",
restoreDefaultNetworks: "Restore default networks",
},
address: {
nameRequired: "Contact Name is required",
addressRequired: "Address is required",
removeAddress: "Remove from address book",
delete: "Delete",
},
}

export default texts
Loading

0 comments on commit 725bd54

Please sign in to comment.