Skip to content

Commit dcaa6bb

Browse files
committed
Release @argent-x/extension@6.11.0
1 parent db57f32 commit dcaa6bb

File tree

553 files changed

+17492
-6702
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

553 files changed

+17492
-6702
lines changed

.github/workflows/pull-request.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
# FEATURE flags
2020
FEATURE_PRIVACY_SETTINGS: "true"
2121
FEATURE_EXPERIMENTAL_SETTINGS: "false"
22-
FEATURE_BETA_FEATURES: "true"
22+
FEATURE_BETA_FEATURES: "false"
2323
FEATURE_BANXA: "true"
2424
FEATURE_LAYERSWAP: "true"
2525
FEATURE_ORBITER: "true"
@@ -29,6 +29,7 @@ jobs:
2929
# API URLs
3030
ARGENT_API_BASE_URL: ${{ vars.ARGENT_API_BASE_URL }}
3131
ARGENT_X_STATUS_URL: ${{ vars.ARGENT_X_STATUS_URL }}
32+
ARGENT_TESTNET_RPC_URL: ${{ vars.ARGENT_TESTNET_RPC_URL }}
3233

3334
# API ENVIRONMENT
3435
ARGENT_X_ENVIRONMENT: ${{ matrix.env }}
@@ -50,6 +51,9 @@ jobs:
5051
SLOW: 60 * 5 # 5m
5152
VERY_SLOW: 24 * 60 * 60 # 1d
5253

54+
#For testing only
55+
FEE_OVERHEAD: 2
56+
5357
steps:
5458
# Setup Project
5559
- uses: actions/checkout@v4
@@ -120,12 +124,13 @@ jobs:
120124

121125
env:
122126
ARGENT_API_BASE_URL: ${{ vars.ARGENT_API_BASE_URL }}
127+
ARGENT_TESTNET_RPC_URL: ${{ vars.ARGENT_TESTNET_RPC_URL }}
123128
ARGENT_X_STATUS_URL: ${{ vars.ARGENT_X_STATUS_URL }}
124129
ARGENT_X_ENVIRONMENT: "hydrogen"
125130

126131
services:
127132
devnet:
128-
image: shardlabs/starknet-devnet:latest-seed0
133+
image: shardlabs/starknet-devnet-rs:latest-seed0
129134
ports:
130135
- 5050:5050
131136

@@ -184,6 +189,7 @@ jobs:
184189
shardTotal: [8]
185190
env:
186191
ARGENT_X_ENVIRONMENT: "hydrogen"
192+
ARGENT_API_BASE_URL: ${{ secrets.ARGENT_API_BASE_URL }}
187193
E2E_TESTNET_SEED1: ${{ secrets.E2E_TESTNET_SEED1 }}
188194
E2E_TESTNET_SEED2: ${{ secrets.E2E_TESTNET_SEED2 }}
189195
E2E_TESTNET_SEED3: ${{ secrets.E2E_TESTNET_SEED3 }}
@@ -195,6 +201,7 @@ jobs:
195201
E2E_SENDER_SEED: ${{ secrets.E2E_SENDER_SEED }}
196202
STARKNET_TESTNET_URL: ${{ secrets.STARKNET_TESTNET_URL }}
197203
STARKSCAN_TESTNET_URL: ${{ secrets.STARKSCAN_TESTNET_URL }}
204+
ARGENT_TESTNET_RPC_URL: ${{ secrets.ARGENT_TESTNET_RPC_URL }}
198205

199206
steps:
200207
- uses: actions/checkout@v4
@@ -397,6 +404,7 @@ jobs:
397404
NEXT_PUBLIC_RAMP_API_KEY: ${{ secrets.RAMP_API_KEY }}
398405
NEXT_PUBLIC_FEATURE_COSIGNER: "true"
399406
NEXT_PUBLIC_ARGENT_API_BASE_URL: ${{ vars.ARGENT_API_BASE_URL }}
407+
NEXT_PUBLIC_ARGENT_TESTNET_RPC_URL: ${{ vars.ARGENT_TESTNET_RPC_URL }}
400408

401409
steps:
402410
- uses: actions/checkout@v4
@@ -445,7 +453,7 @@ jobs:
445453
if: always()
446454
uses: actions/upload-artifact@v3
447455
with:
448-
name: all-blob-reports
456+
name: all-blob-reports-webwallet
449457
path: packages/e2e/blob-report/
450458
retention-days: 5
451459

.github/workflows/release.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
env:
1111
FEATURE_PRIVACY_SETTINGS: "true"
1212
FEATURE_EXPERIMENTAL_SETTINGS: "false"
13-
FEATURE_BETA_FEATURES: "true"
13+
FEATURE_BETA_FEATURES: "false"
1414
FEATURE_BANXA: "true"
1515
FEATURE_LAYERSWAP: "true"
1616
FEATURE_ORBITER: "true"
@@ -26,9 +26,8 @@ env:
2626
FILENAME: argent-extension
2727
SAFE_ENV_VARS: true
2828
ARGENT_API_BASE_URL: ${{ vars.ARGENT_API_BASE_URL }}
29-
ARGENT_TRANSACTION_REVIEW_API_BASE_URL: ${{ vars.ARGENT_TRANSACTION_REVIEW_API_BASE_URL }}
29+
ARGENT_TESTNET_RPC_URL: ${{ vars.ARGENT_TESTNET_RPC_URL }}
3030
ARGENT_X_STATUS_URL: ${{ vars.ARGENT_X_STATUS_URL }}
31-
ARGENT_EXPLORER_BASE_URL: ${{ vars.ARGENT_EXPLORER_BASE_URL }}
3231
ARGENT_X_ENVIRONMENT: "prod"
3332
MULTICALL_MAX_BATCH_SIZE: 20
3433
FAST: 20 # 20s
@@ -136,7 +135,7 @@ jobs:
136135
pnpm --filter @argent/get-starknet publish --no-git-checks --access public || exit 0
137136
pnpm --filter @argent/web-sdk publish --no-git-checks --access public || exit 0
138137
pnpm --filter @argent/starknet-react-webwallet-connector publish --no-git-checks --access public || exit 0
139-
pnpm --filter @argent-x/sessions publish --no-git-checks --access public || exit 0
138+
pnpm --filter @argent/x-sessions publish --no-git-checks --access public || exit 0
140139
141140
- name: Get product version
142141
id: product-version
@@ -149,7 +148,7 @@ jobs:
149148
uses: softprops/action-gh-release@v1
150149
with:
151150
generate_release_notes: true
152-
title: extension@${{ steps.product-version.outputs.current-version }}
151+
name: extension@${{ steps.product-version.outputs.current-version }}
153152
files: |
154153
${{ env.FILENAME }}-chrome.zip
155154
${{ env.FILENAME }}-firefox.zip

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18.18.1
1+
18.18.2

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
"homepage": "https://github.com/argentlabs/argent-x/#readme",
77
"devDependencies": {
88
"@changesets/cli": "^2.26.1",
9-
"@lavamoat/preinstall-always-fail": "^2.0.0",
109
"@lavamoat/allow-scripts": "^3.0.0",
10+
"@lavamoat/preinstall-always-fail": "^2.0.0",
1111
"bundlewatch": "^0.3.3",
1212
"husky": "^8.0.3",
1313
"import-sort-style-module": "^6.0.0",
1414
"lint-staged": "^15.0.0",
15-
"nx": "^16.2.2",
15+
"nx": "^17.0.0",
1616
"patch-package": "^8.0.0",
1717
"prettier": ">=2.8.8",
1818
"prettier-plugin-import-sort": "^0.0.7",

packages/dapp/.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
NEXT_PUBLIC_WEBWALLET_URL="http://localhost:3005"
2+
NEXT_PUBLIC_ARGENT_CHAIN_ID=SN_GOERLI

packages/dapp/next.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@
22
module.exports = {
33
reactStrictMode: true,
44
swcMinify: false, // we need to use terser, as swc doesn't support svelte and `@argent/get-starknet`
5+
publicRuntimeConfig: {
6+
webWalletUrl:
7+
process.env.NEXT_PUBLIC_WEBWALLET_URL ?? "http://localhost:3005",
8+
argentMobileChainId: process.env.NEXT_PUBLIC_ARGENT_CHAIN_ID ?? "SN_GOERLI",
9+
},
510
}

packages/dapp/package.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,24 @@
1111
},
1212
"dependencies": {
1313
"@argent/shared": "^6.3.1",
14-
"@argent/get-starknet": "^6.3.1",
14+
"@argent/ui": "^6.3.1",
1515
"@argent/x-sessions": "^6.3.1",
16+
"@chakra-ui/react": "^2.6.1",
17+
"@starknet-react/chains": "0.1.0-next.1",
18+
"@starknet-react/core": "2.0.0-next.6",
19+
"micro-starknet": "^0.2.3",
1620
"next": "^13.4.6",
1721
"react": "^18.0.0",
1822
"react-dom": "^18.0.0",
19-
"starknet": "5.19.5",
20-
"micro-starknet": "^0.2.3"
23+
"starknet": "5.24.3",
24+
"starknetkit": "^1.0.21"
2125
},
2226
"devDependencies": {
23-
"@types/node": "20.8.4",
27+
"@types/node": "20.8.10",
2428
"@types/react": "^18.0.0",
2529
"@types/react-dom": "^18.0.0",
2630
"eslint": "8",
27-
"eslint-config-next": "13.5.4",
31+
"eslint-config-next": "13.5.6",
2832
"typescript": "^5.0.4"
2933
}
3034
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import { H2 } from "@argent/ui"
2+
import { Flex } from "@chakra-ui/react"
3+
import { addNetwork } from "../services/wallet.service"
4+
import { useState } from "react"
5+
6+
const AddNetwork = () => {
7+
const [addNetworkError, setAddNetworkError] = useState("")
8+
9+
const handleAddNetwork = async () => {
10+
try {
11+
await addNetwork({
12+
id: "dapp-test",
13+
chainId: "SN_DAPP_TEST",
14+
chainName: "Test chain name",
15+
baseUrl: "http://localhost:5050",
16+
})
17+
setAddNetworkError("")
18+
} catch (error) {
19+
setAddNetworkError((error as any).message)
20+
}
21+
}
22+
23+
return (
24+
<Flex direction="column" gap="3" flex="1">
25+
<H2>Network</H2>
26+
<Flex
27+
as="button"
28+
color="#0097fc"
29+
fontWeight="bold"
30+
onClick={handleAddNetwork}
31+
>
32+
Add network to wallet
33+
</Flex>
34+
<span className="error-message">{addNetworkError}</span>
35+
</Flex>
36+
)
37+
}
38+
39+
export { AddNetwork }
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
import { Button, H2 } from "@argent/ui"
2+
import { truncateAddress } from "../services/address.service"
3+
import { DAITokenAddress, ETHTokenAddress } from "../services/token.service"
4+
import { addToken } from "../services/wallet.service"
5+
import { useState } from "react"
6+
import { Code, Flex } from "@chakra-ui/react"
7+
8+
const AddToken = () => {
9+
const [addTokenError, setAddTokenError] = useState("")
10+
11+
const handleAddEth = async () => {
12+
try {
13+
await addToken(ETHTokenAddress)
14+
setAddTokenError("")
15+
} catch (error) {
16+
setAddTokenError((error as any).message)
17+
}
18+
}
19+
20+
const handleAddDai = async () => {
21+
try {
22+
await addToken(DAITokenAddress)
23+
setAddTokenError("")
24+
} catch (error) {
25+
setAddTokenError((error as any).message)
26+
}
27+
}
28+
29+
return (
30+
<Flex direction="column" gap="3" flex="1">
31+
<H2>ERC20</H2>
32+
ETH token address
33+
<Code
34+
backgroundColor="#0097fc4f"
35+
borderRadius="8px"
36+
p="0 0.5rem"
37+
width="fit-content"
38+
>
39+
<a
40+
target="_blank"
41+
rel="noreferrer"
42+
style={{
43+
color: "#0097fc",
44+
display: "inline-block",
45+
textDecoration: "none",
46+
}}
47+
>
48+
{truncateAddress(ETHTokenAddress)}
49+
</a>
50+
</Code>
51+
<Flex
52+
as="button"
53+
color="#0097fc"
54+
fontWeight="bold"
55+
onClick={handleAddEth}
56+
>
57+
Add ETH token to wallet
58+
</Flex>
59+
<Flex
60+
as="button"
61+
color="#0097fc"
62+
fontWeight="bold"
63+
onClick={handleAddDai}
64+
>
65+
Add DAI token to wallet
66+
</Flex>
67+
<span className="error-message">{addTokenError}</span>
68+
</Flex>
69+
)
70+
}
71+
72+
export { AddToken }

0 commit comments

Comments
 (0)