Skip to content

Commit 66d30c0

Browse files
nonuwa-ossiamonuwafelicio
authored
add staking to hub (#811)
* chore: add wagmi configuration and providers for Status Hub * feat: add new icons, promo modal for staking page, integrate connectkit to stake form * feat: implement progress dialog and state management for vault operations * chore: rename progress dialog to action status component and where it is used * feat: integrate SIWE for wallet authentication and enhance vault state management * feat: update vault management with new table and modal components, integrate react-query and react-table * feat: integrate @tanstack/react-query for improved data fetching and state management in vault components * feat: enhance vault management with new compound modal and lock configuration, update table actions for improved user experience * refactor: introduce withdraw modal and enhance lock configuration modal for improved vault management * feat: enhance vault management with new hooks for account vaults and faucet integration, update UI components for improved user experience * feat: enhance vault management with new hooks for token approval, withdrawal, and staking; update UI components and integrate new icons for improved user experience * feat: integrate emergency mode functionality and enhance slider configuration for vault lockup periods; update UI components for improved user experience * feat: enhance vault selection UI with lock status indicators and improve table overflow handling for better user experience * refactor: simplify vault table action handlers by removing unnecessary onClick logic for modal state management * feat: enhance vault management by adding new hooks for staking, multiplier points, and vault locking; update UI components and improve state management for better user experience * chore: add changeset * chore: remove unused eslint-disable comments from vault-related components and update button variants for consistency * feat: add staking constants and improve hooks for vault management; * chore: update vault-related UI components for consistency and improve styling; update zod dependency version * chore: add wagmi configuration and providers for Status Hub * feat: add new icons, promo modal for staking page, integrate connectkit to stake form * feat: implement progress dialog and state management for vault operations * chore: rename progress dialog to action status component and where it is used * feat: integrate SIWE for wallet authentication and enhance vault state management * feat: update vault management with new table and modal components, integrate react-query and react-table * feat: integrate @tanstack/react-query for improved data fetching and state management in vault components * feat: enhance vault management with new compound modal and lock configuration, update table actions for improved user experience * refactor: introduce withdraw modal and enhance lock configuration modal for improved vault management * feat: enhance vault management with new hooks for account vaults and faucet integration, update UI components for improved user experience * feat: enhance vault management with new hooks for token approval, withdrawal, and staking; update UI components and integrate new icons for improved user experience * feat: integrate emergency mode functionality and enhance slider configuration for vault lockup periods; update UI components for improved user experience * feat: enhance vault selection UI with lock status indicators and improve table overflow handling for better user experience * refactor: simplify vault table action handlers by removing unnecessary onClick logic for modal state management * feat: enhance vault management by adding new hooks for staking, multiplier points, and vault locking; update UI components and improve state management for better user experience * chore: add changeset * chore: remove unused eslint-disable comments from vault-related components and update button variants for consistency * feat: add staking constants and improve hooks for vault management; * chore: update vault-related UI components for consistency and improve styling; update zod dependency version * chore: apply commit changes * fix: remove chain id definition in hooks * chore: add button size 24 * chore: fix box-border style * remove border-box sizing * chore: update images * chore: update button to add danger variant * chore: remove button classNames * f checkout from #821 --------- Co-authored-by: iamonuwa <[email protected]> Co-authored-by: nonuwa-oss <[email protected]> Co-authored-by: Felicio <[email protected]>
1 parent 0fa9d76 commit 66d30c0

Some content is hidden

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

74 files changed

+9066
-486
lines changed

.changeset/pretty-wasps-build.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
'@status-im/components': patch
3+
'hub': major
4+
---
5+
6+
### Staking & Vault Management System
7+
8+
- **New Hooks:**
9+
10+
- Staking functionality with multiplier points tracking
11+
- Vault locking mechanisms
12+
- Token approval and withdrawal flows
13+
- Account vaults management
14+
- Faucet integration for testing
15+
- Emergency mode functionality
16+
17+
- **User Experience:**
18+
- Lock status indicators in vault selection UI
19+
- Improved table overflow handling
20+
- Enhanced slider configuration for vault lockup periods
21+
22+
### UI Components
23+
24+
- **New Modals:**
25+
26+
- Withdraw modal for vault withdrawals
27+
- Lock configuration modal for vault locking
28+
- Compound modal for compounding rewards
29+
- Promo modal for staking page
30+
- Action status component (formerly progress dialog)
31+
32+
- **UI Improvements:**
33+
- New icons added
34+
- Enhanced vault table components
35+
- Better modal state management
36+
37+
### Authentication & Web3 Integration
38+
39+
- **SIWE Integration:**
40+
- Sign-In With Ethereum (SIWE) for wallet authentication
41+
- ConnectKit integration for wallet connection
42+
- Wagmi configuration and providers setup
43+
44+
### State Management & Data Fetching
45+
46+
- **Dependencies Added:**
47+
- `@tanstack/react-query` for server state management
48+
- `react-table` for table data management
49+
- Improved overall state management patterns
50+
51+
### Emergency Features
52+
53+
- Emergency mode functionality for vault operations
54+
- Enhanced safety controls for vault lockup periods
55+
56+
## Refactoring & Maintenance
57+
58+
### Code Quality Improvements
59+
60+
- Simplified vault table action handlers
61+
- Removed unnecessary onClick logic for modal state management
62+
- Renamed progress dialog to action status component for clarity

.npmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ engine-strict=true
1717
ignore-workspace-root-check=true
1818
; https://pnpm.io/npmrc#node-options
1919
; why: https://github.com/vercel/next.js/discussions/70423
20-
node-options=--network-family-autoselection-attempt-timeout=500
20+
; node-options=--network-family-autoselection-attempt-timeout=500

apps/hub/.npmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; https://pnpm.io/npmrc#node-options
22
; why: https://github.com/vercel/next.js/discussions/70423
3-
node-options=--network-family-autoselection-attempt-timeout=1000
3+
# node-options=--network-family-autoselection-attempt-timeout=1000
44
; https://pnpm.io/npmrc#node-version
55
node-version=20.18.0
66
; https://pnpm.io/npmrc#engine-strict

apps/hub/package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,17 @@
1414
"clean": "rimraf .next .vercel/output node_modules"
1515
},
1616
"dependencies": {
17+
"@hookform/devtools": "^4.3.1",
18+
"@hookform/resolvers": "^3.1.1",
19+
"@radix-ui/react-dialog": "^1.1.1",
20+
"@scure/base": "^1.2.6",
1721
"@status-im/colors": "workspace:*",
1822
"@status-im/components": "workspace:*",
1923
"@status-im/icons": "workspace:*",
2024
"@status-im/status-network": "workspace:*",
2125
"@status-im/wallet": "workspace:*",
22-
"@tanstack/react-query": "5.66.0",
26+
"@tanstack/react-query": "^5.90.2",
27+
"@tanstack/react-table": "^8.21.3",
2328
"@vercel/analytics": "^1.5.0",
2429
"connectkit": "^1.9.0",
2530
"cva": "1.0.0-beta.1",
@@ -29,9 +34,11 @@
2934
"pino-pretty": "^13.1.1",
3035
"react": "19.1.0",
3136
"react-dom": "19.1.0",
37+
"react-hook-form": "^7.45.1",
3238
"rehype-slug": "^6.0.0",
39+
"siwe": "^2.3.2",
3340
"ts-pattern": "^5.6.2",
34-
"viem": "2.x",
41+
"viem": "^2.21.1",
3542
"wagmi": "2.15.2",
3643
"zod": "^3.24.1"
3744
},
312 KB
Loading
57.7 KB
Loading
8.37 KB
Loading

apps/hub/public/modal/dragon.png

13.3 KB
Loading

apps/hub/public/piggy-bank.png

4.57 KB
Loading
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import type { SVGProps } from 'react'
2+
3+
const CloseIcon = (props: SVGProps<SVGSVGElement>) => (
4+
<svg
5+
xmlns="http://www.w3.org/2000/svg"
6+
width={50}
7+
height={50}
8+
fill="none"
9+
{...props}
10+
>
11+
<path
12+
stroke="#E95460"
13+
strokeLinecap="round"
14+
strokeLinejoin="round"
15+
strokeWidth={4}
16+
d="m10.269 10.27 29.46 29.462M25 45.833c11.506 0 20.834-9.328 20.834-20.834S36.506 4.166 25 4.166 4.167 13.493 4.167 24.999c0 11.506 9.327 20.834 20.833 20.834Z"
17+
/>
18+
</svg>
19+
)
20+
export default CloseIcon

0 commit comments

Comments
 (0)