diff --git a/package-lock.json b/package-lock.json index 2399e3a4..c8299e1c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,6 +32,7 @@ "react-responsive-modal": "^6.4.2", "react-tooltip": "^5.26.4", "sharp": "^0.33.4", + "tailwind-merge": "^2.5.2", "url-safe-base64": "^1.3.0", "usehooks-ts": "^3.0.2" }, @@ -62,6 +63,7 @@ "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "postcss": "^8", + "postcss-import": "^16.1.0", "prettier": "^3.2.5", "prettier-plugin-organize-imports": "^3.2.4", "prettier-plugin-tailwindcss": "^0.5.14", @@ -14074,9 +14076,9 @@ } }, "node_modules/postcss-import": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", - "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-16.1.0.tgz", + "integrity": "sha512-7hsAZ4xGXl4MW+OKEWCnF6T5jqBw80/EE9aXg1r2yyn1RsVEU8EtKXbijEODa+rg7iih4bKf7vlvTGYR4CnPNg==", "dev": true, "license": "MIT", "dependencies": { @@ -14085,7 +14087,7 @@ "resolve": "^1.1.7" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" }, "peerDependencies": { "postcss": "^8.0.0" @@ -15793,6 +15795,16 @@ "dev": true, "license": "MIT" }, + "node_modules/tailwind-merge": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.5.2.tgz", + "integrity": "sha512-kjEBm+pvD+6eAwzJL2Bi+02/9LFLal1Gs61+QB7HvTfQQ0aXwC5LGT8PEt1gS0CWKktKe6ysPTAy3cBC5MeiIg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/dcastil" + } + }, "node_modules/tailwindcss": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.3.tgz", @@ -15831,6 +15843,24 @@ "node": ">=14.0.0" } }, + "node_modules/tailwindcss/node_modules/postcss-import": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", + "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", + "dev": true, + "license": "MIT", + "dependencies": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, "node_modules/tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", diff --git a/package.json b/package.json index 959633df..2284c218 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "node": ">=22.0.0" }, "dependencies": { + "@bitcoin-js/tiny-secp256k1-asmjs": "2.2.3", "@bitcoinerlab/secp256k1": "^1.1.1", "@keystonehq/animated-qr": "^0.8.6", "@keystonehq/keystone-sdk": "^0.4.1", @@ -32,10 +33,9 @@ "@scure/bip32": "^1.4.0", "@tanstack/react-query": "^5.28.14", "@tanstack/react-query-next-experimental": "^5.28.14", - "axios": "^1.7.4", "@uidotdev/usehooks": "^2.4.1", + "axios": "^1.7.4", "bitcoinjs-lib": "6.1.5", - "@bitcoin-js/tiny-secp256k1-asmjs": "2.2.3", "btc-staking-ts": "^0.2.10", "date-fns": "^3.6.0", "decimal.js-light": "^2.5.1", @@ -49,10 +49,12 @@ "react-responsive-modal": "^6.4.2", "react-tooltip": "^5.26.4", "sharp": "^0.33.4", + "tailwind-merge": "^2.5.2", "url-safe-base64": "^1.3.0", "usehooks-ts": "^3.0.2" }, "devDependencies": { + "postcss-import": "^16.1.0", "@babel/core": "^7.24.7", "@babel/preset-env": "^7.24.7", "@babel/preset-react": "^7.24.7", diff --git a/postcss.config.js b/postcss.config.js index 12a703d9..a5a6ff85 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,5 +1,6 @@ module.exports = { plugins: { + "postcss-import": {}, tailwindcss: {}, autoprefixer: {}, }, diff --git a/src/app/components/Modals/ConnectModal.tsx b/src/app/components/Modals/ConnectModal.tsx index ac1eac4e..b37ac034 100644 --- a/src/app/components/Modals/ConnectModal.tsx +++ b/src/app/components/Modals/ConnectModal.tsx @@ -5,6 +5,7 @@ import { FaWallet } from "react-icons/fa"; import { IoMdClose } from "react-icons/io"; import { PiWalletBold } from "react-icons/pi"; import { Tooltip } from "react-tooltip"; +import { twJoin } from "tailwind-merge"; import { getNetworkConfig } from "@/config/network.config"; import { BROWSER_INJECTED_WALLET_NAME, walletList } from "@/utils/wallet/list"; @@ -110,7 +111,10 @@ export const ConnectModal: React.FC = ({ return ( - -
-
- + +
+
+

Connect wallet

+
-
- -
-
- -
-
-

Choose wallet

-
- {walletList.map( - ({ - provider, - name, - linkToDocs, - icon, - isQRWallet, - supportedNetworks, - }) => { - if (name === BROWSER_INJECTED_WALLET_NAME) { - return buildInjectableWallet(isInjectable, name); - } - const walletAvailable = isQRWallet || !!window[provider as any]; - - // If the wallet is integrated but does not support the current network, do not display it - if ( - !supportedNetworks || - !supportedNetworks.includes(getNetworkConfig().network) - ) { - return null; - } - return ( +
+
+ +
+ +
+
+ +
+
+

Choose wallet

+
+ {walletList.map( + ({ + provider, + name, + linkToDocs, + icon, + isQRWallet, + supportedNetworks, + }) => { + if (name === BROWSER_INJECTED_WALLET_NAME) { + return buildInjectableWallet(isInjectable, name); + } + const walletAvailable = + isQRWallet || !!window[provider as any]; + + // If the wallet is integrated but does not support the current network, do not display it + if ( + !supportedNetworks || + !supportedNetworks.includes(getNetworkConfig().network) + ) { + return null; + } + + return ( + + walletAvailable && setSelectedWallet(name) + } + href={!walletAvailable ? linkToDocs : undefined} + target="_blank" + rel="noopener noreferrer" + > +
+
+ {name} +
+

{name}

+ {isQRWallet && ( +
+ + + + +
+ )} +
+
+ ); + }, + )} +
+
+