Skip to content
Merged

Perps #489

Show file tree
Hide file tree
Changes from 133 commits
Commits
Show all changes
155 commits
Select commit Hold shift + click to select a range
44810c4
Merge pull request #177 from pillarwallet/staging
RanaBug Sep 19, 2024
da50f61
Merge pull request #180 from pillarwallet/staging
IAmKio Sep 23, 2024
95711dc
Merge pull request #182 from pillarwallet/staging
IAmKio Sep 23, 2024
d423411
Merge pull request #186 from pillarwallet/staging
RanaBug Oct 1, 2024
c5d3946
Merge pull request #191 from pillarwallet/staging
RanaBug Oct 9, 2024
c5764c1
Merge pull request #197 from pillarwallet/staging
RanaBug Oct 17, 2024
2cf5fb2
Merge pull request #199 from pillarwallet/staging
RanaBug Nov 4, 2024
4161560
Merge pull request #203 from pillarwallet/staging
RanaBug Dec 4, 2024
3fb9187
Merge pull request #206 from pillarwallet/staging
RanaBug Dec 5, 2024
d44fecc
Merge pull request #208 from pillarwallet/staging
IAmKio Dec 9, 2024
cbf3078
Merge pull request #214 from pillarwallet/staging
RanaBug Dec 10, 2024
17135f5
Merge pull request #216 from pillarwallet/staging
RanaBug Dec 11, 2024
7dc3140
Merge pull request #218 from pillarwallet/staging
RanaBug Dec 11, 2024
e48486c
Merge pull request #221 from pillarwallet/staging
RanaBug Dec 20, 2024
33e6d69
Merge pull request #224 from pillarwallet/staging
RanaBug Jan 9, 2025
3e4c0f1
Merge pull request #227 from pillarwallet/staging
RanaBug Jan 9, 2025
467fa54
Merge pull request #229 from pillarwallet/staging
RanaBug Jan 13, 2025
e5dcece
Merge pull request #267 from pillarwallet/staging
RanaBug Mar 24, 2025
8909306
Merge pull request #272 from pillarwallet/staging
RanaBug Mar 26, 2025
2aa6950
Merge pull request #278 from pillarwallet/staging
IAmKio Apr 1, 2025
643919b
Merge pull request #311 from pillarwallet/staging
RanaBug May 21, 2025
8a9ea7e
Merge pull request #325 from pillarwallet/staging
RanaBug May 30, 2025
ec4a325
Merge pull request #340 from pillarwallet/staging
IAmKio Jun 19, 2025
0b66c9c
Merge pull request #361 from pillarwallet/staging
IAmKio Jul 9, 2025
68cbc2b
Merge pull request #371 from pillarwallet/staging
RanaBug Jul 16, 2025
96eb832
Merge pull request #375 from pillarwallet/staging
IAmKio Jul 29, 2025
ad8ac0f
Merge pull request #380 from pillarwallet/staging
IAmKio Jul 31, 2025
3469b56
Merge pull request #383 from pillarwallet/staging
IAmKio Aug 7, 2025
9eca26f
Merge pull request #389 from pillarwallet/staging
IAmKio Aug 26, 2025
c203d0e
Merge pull request #401 from pillarwallet/staging
IAmKio Sep 24, 2025
100769e
Merge pull request #409 from pillarwallet/staging
RanaBug Sep 24, 2025
7073c51
Merge pull request #415 from pillarwallet/staging
RanaBug Oct 3, 2025
8e7ca5c
Merge pull request #430 from pillarwallet/staging
IAmKio Oct 13, 2025
7f93b3a
Merge pull request #434 from pillarwallet/staging
IAmKio Oct 16, 2025
63ed3f3
Merge pull request #443 from pillarwallet/staging
IAmKio Oct 29, 2025
039f677
Merge pull request #451 from pillarwallet/staging
IAmKio Nov 11, 2025
5ad6251
Merge pull request #457 from pillarwallet/staging
IAmKio Nov 27, 2025
d50d38d
Merge pull request #472 from pillarwallet/staging
IAmKio Dec 9, 2025
1f7b025
Merge pull request #479 from pillarwallet/staging
RanaBug Dec 12, 2025
a6015c1
Merge pull request #481 from pillarwallet/staging
IAmKio Dec 15, 2025
9237fb4
fix(pulse): token selector responsiveness and daily price change data
aldin4u Dec 23, 2025
15a2774
feat: Add Perps trading app with Hyperliquid integration
aldin4u Dec 23, 2025
6f3fb95
refactor: Remove all Supabase references from perps app
aldin4u Dec 23, 2025
6a2f78c
chore: Remove temp files from git tracking
aldin4u Dec 23, 2025
416ed68
Merge pull request #490 from pillarwallet/staging
IAmKio Jan 5, 2026
8029b36
feat(perps): Add sparkline chart, global account storage, and validat…
aldin4u Jan 6, 2026
9c227ad
Merge perp branch updates into perps
aldin4u Jan 6, 2026
c6b97bd
feat(perps): UX/UI improvements based on product design audit
aldin4u Jan 6, 2026
6ba304e
feat(perps): Add mobile-first redesign with responsive detection
aldin4u Jan 6, 2026
8c30b40
feat(perps): Set BTC as default asset and remove status banner
aldin4u Jan 6, 2026
50de434
feat(perps): Enhance AssetSelector with market data and sorting
aldin4u Jan 6, 2026
ac4a4de
fix(perps): Correct AssetSelector API response parsing
aldin4u Jan 6, 2026
7de7959
feat(perps): Add comprehensive market data to chart
aldin4u Jan 6, 2026
69d3b76
refactor(perps): Implement horizontal market data ticker
aldin4u Jan 6, 2026
c0f429a
style(perps): Fix horizontal ticker layout using flexbox
aldin4u Jan 6, 2026
7d9e08d
style(perps): Move market ticker to top-right corner
aldin4u Jan 6, 2026
b9e475b
style(perps): Enforce top-right ticker alignment
aldin4u Jan 6, 2026
60e9c31
revert(perps): Revert mobile-specific view and fix ticker alignment
aldin4u Jan 6, 2026
adafe01
style(perps): Finalize top-right ticker alignment without relative po…
aldin4u Jan 6, 2026
aabc2bd
style(perps): Align ticker to price baseline and reduce polling
aldin4u Jan 6, 2026
0d29cff
fix(perps): Improve ticker alignment and reduce API polling
aldin4u Jan 6, 2026
22abdfe
fix(perps): Final ticker alignment to top-right corner
aldin4u Jan 6, 2026
3629aec
fix(perps): Resolve stacked layout on laptop screens
aldin4u Jan 6, 2026
62c9b65
style(perps): Final typography alignment for header
aldin4u Jan 6, 2026
a40aea7
style(perps): Finalize mobile ticker optimization
aldin4u Jan 6, 2026
20817fb
feat(perps): Implement true JS split for responsive header
aldin4u Jan 6, 2026
055a6fb
fix: refactor asset loading for instant strategy paste
aldin4u Jan 6, 2026
35d5bbc
chore: apply prettier formatting
aldin4u Jan 6, 2026
bcc6853
fix: resolve build OOM by lazy loading pillarx-app in Lobby
aldin4u Jan 6, 2026
8c5c554
fix: resolve package-lock.json conflict by regeneration
aldin4u Jan 6, 2026
d7f0a94
fix: build issues, linting, and regenerate lockfile for deployment
aldin4u Jan 7, 2026
a6fbe25
fix: syntax error in MobilePositionsCard
aldin4u Jan 7, 2026
b16a1e8
fix: move Wrapper definition to fix no-use-before-define lint error
aldin4u Jan 7, 2026
3993187
fix: increase node memory limit for build to 4GB
aldin4u Jan 7, 2026
26d997c
chore: revert unintentional formatting changes to insights app
aldin4u Jan 7, 2026
33b0586
feat: implement click-to-load asset for positions
aldin4u Jan 7, 2026
d1414ff
fix(perps): map raw asset to AssetInfo for click-to-load
aldin4u Jan 7, 2026
ceeec85
fix(perps): robust click-to-load with fallback fetching and price enr…
aldin4u Jan 7, 2026
aa01e7e
refactor(perps): centralized asset selection logic
aldin4u Jan 7, 2026
311e952
fix(perps): restore missing variables in Index.tsx
aldin4u Jan 7, 2026
3f48bb5
feat(perps): implement click-to-load asset with conditional scroll
aldin4u Jan 7, 2026
c8ae0d8
fix(perps): remove duplicate identifier in MobilePositionsCard
aldin4u Jan 7, 2026
bd68cda
fix(tests): mock env var to resolve snapshot mismatch
aldin4u Jan 7, 2026
f11602d
feat(perps): UI refinements and imported account restrictions
aldin4u Jan 7, 2026
78fc7b5
chore: remove unused token logo generation script and constants
aldin4u Jan 7, 2026
d20140b
fix: increase Node.js heap size to 8GB for build
aldin4u Jan 8, 2026
02a37d8
chore: remove test script for Hyperliquid flow
aldin4u Jan 8, 2026
9c7de98
chore: revert unrelated developer-apps changes
aldin4u Jan 8, 2026
966b9f9
chore: revert all non-perps changes to create pure perps branch
aldin4u Jan 8, 2026
53b77ed
refactor(perps): improve type safety, optimization, and bug fixes
aldin4u Jan 8, 2026
f2712f1
feat: implement PIN-based encrypted wallet storage
aldin4u Jan 8, 2026
50c3644
fix(agent): resolve duplicate imports and syntax error
aldin4u Jan 8, 2026
a4af822
fix(agent): remove duplicate function declaration
aldin4u Jan 8, 2026
4e587a6
fix(agent): restore missing closing divs
aldin4u Jan 8, 2026
c9edd49
fix(agent): ensure modals are reachable by moving them out of conditi…
aldin4u Jan 8, 2026
cda6d02
fix(keystore): define missing cache variable
aldin4u Jan 8, 2026
174de53
feat(agent): encrypt imported wallets with PIN
aldin4u Jan 8, 2026
d31fd30
feat(agent): add private key display modal
aldin4u Jan 8, 2026
419ba7a
style(agent): improve PIN input UI and update copy
aldin4u Jan 8, 2026
9991f40
fix(agent): restore useState import
aldin4u Jan 8, 2026
4cd75c0
style(agent): update locked status label
aldin4u Jan 8, 2026
534c3b6
fix(agent): hot-load cache and trigger refresh on creation
aldin4u Jan 8, 2026
c485a25
feat(agent): add settings menu and conditional reveal
aldin4u Jan 8, 2026
1a28c3b
fix(agent): remove duplicate import
aldin4u Jan 8, 2026
480c09c
fix(agent): update state after import
aldin4u Jan 8, 2026
e98e1d0
fix(hyperliquid): fallback to agent balance if main empty
aldin4u Jan 8, 2026
71f3f56
fix(ui): pass fetched agent data to PositionsCard
aldin4u Jan 8, 2026
37628f7
fix(ui): remove duplicate identifier
aldin4u Jan 8, 2026
3a9cc79
fix(ui): re-render positions on external state change
aldin4u Jan 8, 2026
43b03d0
revert(hyperliquid): remove agent fallback logic
aldin4u Jan 8, 2026
d839710
chore(debug): show master address in ui
aldin4u Jan 8, 2026
e81df97
fix(hyperliquid): prioritize agent wallet and propagate active address
aldin4u Jan 8, 2026
ef605f2
fix(hyperliquid): enforce agent usage and link history card
aldin4u Jan 8, 2026
0432f17
fix(hyperliquid): unconditional agent usage
aldin4u Jan 8, 2026
b94b29c
fix(ui): robust position display with fallback metadata
aldin4u Jan 8, 2026
90f8c4e
Implemented local encryption storage and UI fixes
aldin4u Jan 8, 2026
23834ea
feat: Refine Perps agent flow, validation, and UI
aldin4u Jan 8, 2026
e47f8f3
fix(test): mock VITE_SWAP_BUTTON_SWITCH env var in CardSwap test
aldin4u Jan 8, 2026
d866e19
fix(test): use vi.stubEnv for VITE_SWAP_BUTTON_SWITCH mock
aldin4u Jan 8, 2026
0fc70a2
feat: enhance keystore security, refine UI scale and loading states
aldin4u Jan 9, 2026
db30a2e
fix: correct deposit check to use EOA balance and cleanup logs
aldin4u Jan 9, 2026
5a6a330
pushing all the changes done
vignesha22 Jan 9, 2026
8adcbda
Merge branch 'perps' of github.com:pillarwallet/x into perps
vignesha22 Jan 9, 2026
f11477a
Revert "fix: correct deposit check to use EOA balance and cleanup logs"
vignesha22 Jan 9, 2026
97056f2
feat: add perps app to local allowed apps list
vignesha22 Jan 9, 2026
e2a7abd
feat: mandatory pillarx builder approval
aldin4u Jan 10, 2026
425b628
fix(ui): prevent mobile zoom, add copy buttons, autofocus pin
aldin4u Jan 10, 2026
7d338b7
feat(auth): add privy passkey creation to portfolio tile
aldin4u Jan 10, 2026
d5938d6
fix: resolve builder address type mismatch in keystore
aldin4u Jan 10, 2026
9ab23a9
feat: improve mobile PIN input auto-focus
aldin4u Jan 10, 2026
e448eea
fix: resolve invalid builder param type in order payload and dynamic …
aldin4u Jan 10, 2026
ae0f838
fix: correct relative import path for utils/blockchain in client.ts
aldin4u Jan 10, 2026
1e63d6b
feat: separate import account flow using imported private key and eve…
aldin4u Jan 10, 2026
29afd3b
fix: skip builder fee for imported accounts and fix sdk private key u…
aldin4u Jan 10, 2026
adef24d
Fix leverage label visibility and builder fee exemption for imported …
aldin4u Jan 12, 2026
128f99a
Fix deployment build failure by adding .npmrc to prevent git config e…
aldin4u Jan 15, 2026
578c895
Skip patch-package in Cloudflare Pages to prevent git config errors
aldin4u Jan 15, 2026
ce7d078
Remove postinstall script to fix Cloudflare Pages deployment
aldin4u Jan 15, 2026
cf90f30
package lock updated
RanaBug Jan 15, 2026
56c8e4d
fix: implement proper withdraw3 signing with master wallet
aldin4u Jan 19, 2026
48807cb
fix: add type module to package.json for Cloudflare Pages build
aldin4u Jan 19, 2026
da3164d
fix: address 7 CodeRabbit review issues
aldin4u Jan 19, 2026
178abb0
fix: add missing Tailwind tokens and animations
aldin4u Jan 19, 2026
1f13cb9
fix: improve mobile components React best practices
aldin4u Jan 19, 2026
69ff7bc
fix: convert config files to ESM and fix sidebar SSR issue
aldin4u Jan 19, 2026
7506c20
fix(perps): resolve PR #489 comments and build failure
aldin4u Jan 19, 2026
1ab9b85
Revert "fix(perps): resolve PR #489 comments and build failure"
aldin4u Jan 20, 2026
1b4d117
fix(perps): re-export roundToSzDecimals to fix build failure
aldin4u Jan 20, 2026
2d050fd
fix(privy): add validation for VITE_PRIVY_APP_ID to prevent silent fa…
aldin4u Jan 20, 2026
48d4d1e
fix(privy): add fallback to default Privy App ID for production builds
aldin4u Jan 20, 2026
0ceec49
revert: remove hardcoded Privy App ID fallback to test env vars
aldin4u Jan 20, 2026
04acd02
fix(build): revert to staging build script to fix env var handling
aldin4u Jan 20, 2026
ebf4981
style: fix indentation in Main.tsx
aldin4u Jan 20, 2026
eca3b16
fix(signing): add type casts for withdraw primaryType to resolve viem…
aldin4u Jan 20, 2026
f6ccf89
fix(build): re-add NODE_OPTIONS to prevent heap out of memory error
aldin4u Jan 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</script>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

git ls-files | grep -i "index.html" | head -20

Repository: pillarwallet/x

Length of output: 68


🏁 Script executed:

cat -n index.html | sed -n '40,55p'

Repository: pillarwallet/x

Length of output: 886


🏁 Script executed:

git log --oneline -n 20 -- index.html

Repository: pillarwallet/x

Length of output: 127


🌐 Web query:

WCAG 1.4.4 Resize text requirement pinch zoom viewport meta tag

💡 Result:

Short answer: Disabling pinch/zoom via the viewport meta tag (e.g. user-scalable=no or maximum-scale less than 2 / maximum-scale=1) can cause a WCAG 1.4.4 (Resize Text, Level AA) failure because it prevents users from enlarging text up to 200%. To conform, do not block user zoom in the meta viewport and ensure your CSS/layout lets text enlarge and reflow without loss of content or functionality. [1][2][3]

Recommended fix: use a simple viewport like

and remove user-scalable / maximum-scale constraints; test zoom to 200% (or text-only resizing) on mobile and desktop and fix any clipping/overflow with responsive/CSS changes. [1][2][3]

Sources:
[1] W3C Understanding SC 1.4.4 Resize Text.
[2] W3C/ACT rule “Meta viewport allows for zoom” (checks user-scalable and maximum-scale).
[3] Guidance examples and fixes (GetWCAG / accessibility tool guidance on not disabling zoom).


Disable zoom restrictions to meet WCAG 1.4.4 (Resize Text) accessibility requirement.

The viewport meta tag with maximum-scale=1 and user-scalable=0 prevents users from zooming to 200%, violating Web Content Accessibility Guidelines Level AA. Users with visual impairments cannot enlarge text to read content.

To prevent accidental zoom during trading interactions without blocking accessibility, remove the zoom restrictions and use CSS touch-action: manipulation on specific interactive elements (buttons, sliders) to prevent double-tap zoom while preserving pinch-zoom capability:

-    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
+    <meta name="viewport" content="width=device-width, initial-scale=1" />

Then apply to interactive elements:

.trading-button,
.chart-canvas {
  touch-action: manipulation;
}

Test zoom functionality to 200% on mobile devices to confirm text enlarges without clipping.

🤖 Prompt for AI Agents
In @index.html at line 47, Remove the zoom-restricting attributes from the
viewport meta element (remove maximum-scale=1 and user-scalable=0 in the
existing <meta name="viewport"> tag) so users can pinch/zoom to 200%, and
instead add CSS touch-action: manipulation to interactive controls used during
trading (e.g., the .trading-button and .chart-canvas selectors referenced in the
comment) to prevent double-tap zoom without disabling pinch-zoom; after making
these changes, test mobile pinch-zoom to 200% to confirm text resizing works as
expected.

<meta name="theme-color" content="#000000" />
<meta
name="description"
Expand Down
1,032 changes: 478 additions & 554 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"dev": "vite",
"dev:functions": "wrangler pages dev build --port 5173 --live-reload",
"build": "VITE_COMMIT_SHA=$CF_PAGES_COMMIT_SHA VITE_VERSION=$npm_package_version vite build",
"build": "NODE_OPTIONS='--max-old-space-size=8192' VITE_COMMIT_SHA=$CF_PAGES_COMMIT_SHA VITE_VERSION=$npm_package_version vite build",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Look for CommonJS patterns in config files after switching to ESM
rg -n "module\.exports|require\(" -g "*config*.{js,ts,cjs,mjs}" -g ".eslintrc.*" .

Repository: pillarwallet/x

Length of output: 1034


🏁 Script executed:

#!/bin/bash
# Find all config files in the repository
fd -e "js" -e "ts" -e "cjs" -e "mjs" | rg "^[^/]*\.(config\.)?(js|ts|cjs|mjs)$|^\..*rc.*$" | head -30

Repository: pillarwallet/x

Length of output: 150


🏁 Script executed:

#!/bin/bash
# Check the package.json to confirm the "type": "module" setting
cat package.json | head -20

Repository: pillarwallet/x

Length of output: 935


Migrate CommonJS config files to ESM or rename to .cjs after adding "type": "module".

Multiple config files use CommonJS syntax that will break with ESM:

  • 8 Tailwind config files across apps (token-atlas, key-wallet, the-exchange, pulse, leaderboard, pillarx-app, insights, deposit) use module.exports and require()
  • config-overrides.js uses require() for webpack and terser
  • These must be converted to ESM imports/exports or renamed to .cjs extension to remain loadable
🤖 Prompt for AI Agents
In `@package.json` around lines 5 - 9, The project set "type": "module" so
CommonJS config files must be converted or renamed: update each Tailwind config
(token-atlas, key-wallet, the-exchange, pulse, leaderboard, pillarx-app,
insights, deposit) and config-overrides.js to use ESM syntax (replace
module.exports/require with export default and import) or rename them to .cjs
(e.g., config-overrides.cjs, tailwind.config.cjs) so Node can load them; ensure
any webpack/terser usage in config-overrides is converted to ESM imports if you
choose ESM, and verify build scripts still resolve the new filenames.

"preview": "vite preview",
"test": "vitest",
"test:watch": "eslint . && vitest",
Expand All @@ -24,11 +24,13 @@
"@etherspot/intent-sdk": "1.0.0-alpha.12",
"@etherspot/modular-sdk": "6.1.1",
"@etherspot/transaction-kit": "2.1.4",
"@hookform/resolvers": "^5.2.2",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

npm view `@hookform/resolvers`@^5.2.2 version 2>/dev/null || npm view `@hookform/resolvers` version
npm view `@nktkas/hyperliquid`@^0.30.2 version 2>/dev/null || npm view `@nktkas/hyperliquid` version

Repository: pillarwallet/x

Length of output: 70


🏁 Script executed:

cd /tmp && cat << 'EOF' > check_versions.js
const https = require('https');

function getPackageVersion(pkgName, specVersion) {
  return new Promise((resolve) => {
    https.get(`https://registry.npmjs.org/${pkgName}`, (res) => {
      let data = '';
      res.on('data', chunk => data += chunk);
      res.on('end', () => {
        try {
          const pkg = JSON.parse(data);
          const latest = pkg['dist-tags'].latest;
          resolve({ package: pkgName, specVersion, latest });
        } catch (e) {
          resolve({ package: pkgName, specVersion, error: 'Failed to parse' });
        }
      });
    }).on('error', err => resolve({ package: pkgName, specVersion, error: err.message }));
  });
}

Promise.all([
  getPackageVersion('@hookform/resolvers', '^5.2.2'),
  getPackageVersion('@nktkas/hyperliquid', '^0.30.2')
]).then(results => {
  results.forEach(r => console.log(JSON.stringify(r)));
});
EOF
node check_versions.js

Repository: pillarwallet/x

Length of output: 207


🏁 Script executed:

# Search for usage of these packages in the codebase
echo "=== Searching for `@hookform/resolvers` usage ==="
rg "@hookform/resolvers" --type ts --type tsx --type js --type jsx

echo -e "\n=== Searching for `@nktkas/hyperliquid` usage ==="
rg "@nktkas/hyperliquid" --type ts --type tsx --type js --type jsx

echo -e "\n=== Checking package.json context ==="
cat package.json | grep -A 2 -B 2 "@hookform/resolvers"
cat package.json | grep -A 2 -B 2 "@nktkas/hyperliquid"

Repository: pillarwallet/x

Length of output: 630


@hookform/resolvers and @nktkas/hyperliquid appear unused in the codebase.

Both dependencies are at the latest available versions (@hookform/resolvers@5.2.2, @nktkas/hyperliquid@0.30.2), but no usage was found in the source files. Before merging, verify these dependencies are actually needed or remove them if they are leftover from previous code.

🤖 Prompt for AI Agents
In `@package.json` at line 27, The package.json lists dependencies
"@hookform/resolvers" and "@nktkas/hyperliquid" that appear unused; please
search the repo for imports/usages of "@hookform/resolvers" and
"@nktkas/hyperliquid" (e.g., in React forms or template rendering code) and if
none are referenced remove them from package.json and run npm/yarn install to
update lockfile, otherwise keep and add a brief code comment or usage where
appropriate to justify keeping them; ensure any removal also updates CI/build
steps that might rely on them.

"@hypelab/sdk-react": "1.0.4",
"@lifi/sdk": "3.6.8",
"@mui/icons-material": "5.16.6",
"@mui/joy": "5.0.0-beta.48",
"@mui/material": "5.16.6",
"@nktkas/hyperliquid": "^0.30.2",
"@privy-io/react-auth": "2.16.0",
"@radix-ui/react-accordion": "^1.2.11",
"@radix-ui/react-alert-dialog": "^1.1.14",
Expand Down Expand Up @@ -89,11 +91,13 @@
"iconsax-react": "0.0.8",
"identicon.js": "2.3.3",
"input-otp": "^1.4.2",
"lightweight-charts": "^5.1.0",
"lodash": "4.17.21",
"lucide-react": "^0.462.0",
"luxon": "3.5.0",
"mime": "4.0.4",
"moment": "2.30.1",
"next-themes": "^0.4.6",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check how next-themes is used in the codebase
echo "=== Searching for next-themes usage ==="
rg -n "next-themes" --type ts --type tsx -C 3 2>/dev/null || rg -n "next-themes" -g "*.ts" -g "*.tsx" -C 3

echo ""
echo "=== Checking ThemeProvider setup ==="
rg -n "ThemeProvider" -g "*.tsx" -g "*.ts" -C 5

Repository: pillarwallet/x

Length of output: 32303


🏁 Script executed:

cat -n src/apps/perps/components/ui/sonner.tsx

Repository: pillarwallet/x

Length of output: 1161


🏁 Script executed:

# Search for next-themes ThemeProvider setup
rg "ThemeProvider.*next-themes" -g "*.ts" -g "*.tsx"
rg "from.*next-themes" -g "*.ts" -g "*.tsx"

Repository: pillarwallet/x

Length of output: 137


Remove unused next-themes or add required ThemeProvider initialization.

next-themes is imported and useTheme() is called in src/apps/perps/components/ui/sonner.tsx, but no ThemeProvider from next-themes is configured anywhere in the codebase. The useTheme() hook requires a ThemeProvider wrapper to function; without it, the theme will be undefined. Either remove the next-themes dependency (since the project uses styled-components for theming) or add the required ThemeProvider initialization.

🤖 Prompt for AI Agents
In `@package.json` at line 99, The project includes "next-themes" in package.json
but no ThemeProvider is configured while useTheme() is called in the Sonner
component; either remove the dependency and all uses/imports of useTheme from
src/apps/perps/components/ui/sonner.tsx, or add the missing ThemeProvider
initialization by wrapping your app root with ThemeProvider from "next-themes"
(e.g., in your App or RootLayout component) so useTheme() receives a defined
theme; update imports accordingly and remove unused package if you choose the
first option.

"patch-package": "8.0.0",
"plausible-tracker": "0.3.9",
"prop-types": "15.8.1",
Expand Down Expand Up @@ -128,7 +132,8 @@
"viem": "2.37.1",
"vite-plugin-svgr": "4.3.0",
"wagmi": "2.14.16",
"webfontloader": "1.6.28"
"webfontloader": "1.6.28",
"zod": "^3.25.76"
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "7.21.11",
Expand Down Expand Up @@ -212,4 +217,4 @@
"resolutions": {
"styled-components": "6.1.1"
}
}
}
42 changes: 42 additions & 0 deletions src/apps/perps/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#root {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
}

.logo {
height: 6em;
padding: 1.5em;
will-change: filter;
transition: filter 300ms;
}
.logo:hover {
filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.react:hover {
filter: drop-shadow(0 0 2em #61dafbaa);
}

@keyframes logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}

@media (prefers-reduced-motion: no-preference) {
a:nth-of-type(2) .logo {
animation: logo-spin infinite 20s linear;
}
}

.card {
padding: 2em;
}

.read-the-docs {
color: #888;
}
Loading