Skip to content

Commit 59ff127

Browse files
tom2drumnzenchik
andauthored
"Add chain" button in the header (#3084)
* redesign "add chain" button * fix wallet detection * [skip ci] update default value for ENV * fix tests * return button to the footer and add source to mixpanel event * regcred from helmfile for review * [skip ci] remove wallets env from values for demo stand * use react-query to cache detection result * add cookie to hide button in the topbar * add prefix to svg ids to fix rabby icon * update screenshot * remove unnecessary comment --------- Co-authored-by: Nick Zenchik <n.zenchik@gmail.com>
1 parent abf0015 commit 59ff127

File tree

60 files changed

+423
-141
lines changed

Some content is hidden

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

60 files changed

+423
-141
lines changed

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ echo 🧿 Running svg formatter...
1010
for file in `git diff --diff-filter=ACMRT --cached --name-only | grep ".svg\$"`
1111
do
1212
echo "Formatting $file"
13-
./node_modules/.bin/svgo -q $file
13+
./node_modules/.bin/svgo -q $file --config svgo.config.format.js
1414
git add $file
1515
done
1616

configs/app/features/web3Wallet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const wallets = ((): Array<WalletType> | undefined => {
1313
const wallets = parseEnvJson<Array<WalletType>>(envValue)?.filter((type) => SUPPORTED_WALLETS.includes(type));
1414

1515
if (!wallets || wallets.length === 0) {
16-
return [ 'metamask' ];
16+
return [ 'metamask', 'rabby', 'coinbase', 'trust', 'okx', 'token_pocket' ];
1717
}
1818

1919
return wallets;

deploy/values/review/values.yaml.gotmpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ frontend:
6363
NEXT_PUBLIC_HOMEPAGE_CHARTS: "['daily_txs','coin_price','market_cap']"
6464
NEXT_PUBLIC_NETWORK_RPC_URL: https://eth-sepolia.public.blastapi.io
6565
NEXT_PUBLIC_NETWORK_EXPLORERS: "[{'title':'Bitquery','baseUrl':'https://explorer.bitquery.io/','paths':{'tx':'/goerli/tx','address':'/goerli/address','token':'/goerli/token','block':'/goerli/block'}},{'title':'Etherscan','logo':'https://github.com/blockscout/frontend-configs/blob/main/configs/explorer-logos/etherscan.png?raw=true','baseUrl':'https://goerli.etherscan.io/','paths':{'tx':'/tx','address':'/address','token':'/token','block':'/block'}}]"
66-
NEXT_PUBLIC_WEB3_WALLETS: "['token_pocket','coinbase','metamask']"
6766
NEXT_PUBLIC_VIEWS_ADDRESS_IDENTICON_TYPE: gradient_avatar
6867
NEXT_PUBLIC_VIEWS_CONTRACT_SOLIDITYSCAN_ENABLED: true
6968
NEXT_PUBLIC_USE_NEXT_JS_PROXY: true

docs/ENVS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ This feature is **enabled by default** with the `['metamask']` value. To switch
649649

650650
| Variable | Type| Description | Compulsoriness | Default value | Example value | Version |
651651
| --- | --- | --- | --- | --- | --- | --- |
652-
| NEXT_PUBLIC_WEB3_WALLETS | `Array<'metamask' \| 'coinbase' \| 'token_pocket'>` | Array of Web3 wallets which will be used to add tokens or chain to. The first wallet which is enabled in user's browser will be shown. | - | `[ 'metamask' ]` | `[ 'coinbase' ]` | v1.10.0+ |
652+
| NEXT_PUBLIC_WEB3_WALLETS | `Array<'metamask' \| 'coinbase' \| 'token_pocket' \| 'rabby' \| 'trust' \| 'okx'>` | Array of Web3 wallets which will be used to add tokens or chain to. The first wallet which is enabled in user's browser will be shown. | - | `[ 'metamask', 'rabby', 'coinbase', 'trust', 'okx', 'token_pocket' ]` | `[ 'coinbase' ]` | v1.10.0+ |
653653
| NEXT_PUBLIC_WEB3_DISABLE_ADD_TOKEN_TO_WALLET | `boolean`| Set to `true` to hide icon "Add to your wallet" next to token addresses | - | - | `true` | v1.0.x+ |
654654

655655
&nbsp;

icons/ABI_slim.svg

Lines changed: 2 additions & 2 deletions
Loading

icons/blobs/image.svg

Lines changed: 2 additions & 2 deletions
Loading

icons/blobs/raw.svg

Lines changed: 2 additions & 2 deletions
Loading

icons/brands/celenium.svg

Lines changed: 4 additions & 4 deletions
Loading

icons/brands/solidity_scan.svg

Lines changed: 2 additions & 2 deletions
Loading

0 commit comments

Comments
 (0)