From 3b0b95958fa993d5174bf1dd5e232aa1769a856a Mon Sep 17 00:00:00 2001 From: Shannon Code Date: Sun, 30 Nov 2025 11:26:17 -0500 Subject: [PATCH 1/3] Add HUSTLE token support and fix TypeScript errors - Add HUSTLE token with mint HUSTLFV3U5Km8u66rMQExh4nLy7unfKHedEXVK1WgSAG (9 decimals) - Update token selector grid to 7 columns for all tokens - Fix TokenSymbol type in DepositForm, WithdrawForm, TransferForm, and BalanceCard - Update LandingPage marketing text - Update README with HUSTLE in supported tokens --- README.md | 21 +++++++++++---------- components/BalanceCard.tsx | 1 + components/Dashboard.tsx | 4 ++-- components/DepositForm.tsx | 3 ++- components/LandingPage.tsx | 2 +- components/TransferForm.tsx | 5 +++-- components/WithdrawForm.tsx | 3 ++- 7 files changed, 22 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index cc5f619..6ee8bc6 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Private payments on Solana using zero-knowledge proofs. ## Features - **Private Transfers** - Hide transaction amounts using Bulletproofs -- **Multi-Token Support** - SOL, USDC, ORE, BONK, JIM, GODL +- **Multi-Token Support** - SOL, USDC, ORE, BONK, JIM, GODL, HUSTLE - **Multiple Wallets** - Phantom, Solflare, Torus, Ledger - **Deposit & Withdraw** - Seamlessly manage your ShadowWire balance - **Fast & Secure** - Built on Solana with audited smart contracts @@ -74,14 +74,15 @@ Click "Select Wallet" and choose your preferred Solana wallet (Phantom, Solflare ## Supported Tokens -| Token | Decimals | -|-------|----------| -| SOL | 9 | -| USDC | 6 | -| ORE | 11 | -| BONK | 5 | -| JIM | 9 | -| GODL | 11 | +| Token | Decimals | +|--------|----------| +| SOL | 9 | +| USDC | 6 | +| ORE | 11 | +| BONK | 5 | +| JIM | 9 | +| GODL | 11 | +| HUSTLE | 9 | ## Tech Stack @@ -95,7 +96,7 @@ Click "Select Wallet" and choose your preferred Solana wallet (Phantom, Solflare ### Supporting Only Specific Tokens -By default, the app supports all ShadowWire tokens (SOL, USDC, ORE, BONK, JIM, GODL). To limit to specific tokens: +By default, the app supports all ShadowWire tokens (SOL, USDC, ORE, BONK, JIM, GODL, HUSTLE). To limit to specific tokens: 1. Open `components/Dashboard.tsx` 2. Modify the `SUPPORTED_TOKENS` array: diff --git a/components/BalanceCard.tsx b/components/BalanceCard.tsx index f449ecf..948b790 100644 --- a/components/BalanceCard.tsx +++ b/components/BalanceCard.tsx @@ -19,6 +19,7 @@ export function BalanceCard({ token, balance, loading, error, onRefresh }: Balan BONK: 5, JIM: 9, GODL: 11, + Hustle: 9, } return decimals[token] || 9 } diff --git a/components/Dashboard.tsx b/components/Dashboard.tsx index 588e891..7630373 100644 --- a/components/Dashboard.tsx +++ b/components/Dashboard.tsx @@ -8,7 +8,7 @@ import { BalanceCard } from './BalanceCard' import { DepositForm } from './DepositForm' import { WithdrawForm } from './WithdrawForm' -const SUPPORTED_TOKENS = ['SOL', 'USDC', 'ORE', 'BONK', 'JIM', 'GODL'] as const +const SUPPORTED_TOKENS = ['SOL', 'USDC', 'ORE', 'BONK', 'JIM', 'GODL', 'HUSTLE'] as const type Token = typeof SUPPORTED_TOKENS[number] type ActiveTab = 'deposit' | 'withdraw' | 'transfer' @@ -64,7 +64,7 @@ export function Dashboard() { -
+
{SUPPORTED_TOKENS.map((token) => (
diff --git a/components/TransferForm.tsx b/components/TransferForm.tsx index 7c5a2fa..c57d315 100644 --- a/components/TransferForm.tsx +++ b/components/TransferForm.tsx @@ -1,13 +1,13 @@ 'use client' import { useState } from 'react' -import { ShadowWireClient, RecipientNotFoundError, InsufficientBalanceError } from '@radr/shadowwire' +import { ShadowWireClient, RecipientNotFoundError, InsufficientBalanceError, TokenSymbol } from '@radr/shadowwire' import { useWallet } from '@solana/wallet-adapter-react' interface TransferFormProps { client: ShadowWireClient senderWallet: string - selectedToken: string + selectedToken: TokenSymbol currentBalance: number onTransferComplete: () => void } @@ -37,6 +37,7 @@ export function TransferForm({ BONK: 5, JIM: 9, GODL: 11, + Hustle: 9, } return decimals[token] || 9 } diff --git a/components/WithdrawForm.tsx b/components/WithdrawForm.tsx index bf06261..ecd5270 100644 --- a/components/WithdrawForm.tsx +++ b/components/WithdrawForm.tsx @@ -35,6 +35,7 @@ export function WithdrawForm({ BONK: 5, JIM: 9, GODL: 11, + Hustle: 9, } return decimals[token] || 9 } @@ -75,7 +76,7 @@ export function WithdrawForm({ const response = await client.withdraw({ wallet: walletAddress, amount: amountInSmallestUnit, - token: selectedToken, + token_mint: selectedToken, }) console.log('Withdraw response:', response) From e5ec032112551cc39f38ad6fb74850c42c8d3b4b Mon Sep 17 00:00:00 2001 From: Shannon Code Date: Sun, 30 Nov 2025 11:30:24 -0500 Subject: [PATCH 2/3] Fix HUSTLE token casing in form components --- components/DepositForm.tsx | 2 +- components/TransferForm.tsx | 2 +- components/WithdrawForm.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/DepositForm.tsx b/components/DepositForm.tsx index aa6b645..12ba36c 100644 --- a/components/DepositForm.tsx +++ b/components/DepositForm.tsx @@ -33,7 +33,7 @@ export function DepositForm({ BONK: 5, JIM: 9, GODL: 11, - Hustle: 9, + HUSTLE: 9, } return decimals[token] || 9 } diff --git a/components/TransferForm.tsx b/components/TransferForm.tsx index c57d315..001374d 100644 --- a/components/TransferForm.tsx +++ b/components/TransferForm.tsx @@ -37,7 +37,7 @@ export function TransferForm({ BONK: 5, JIM: 9, GODL: 11, - Hustle: 9, + HUSTLE: 9, } return decimals[token] || 9 } diff --git a/components/WithdrawForm.tsx b/components/WithdrawForm.tsx index ecd5270..6a52946 100644 --- a/components/WithdrawForm.tsx +++ b/components/WithdrawForm.tsx @@ -35,7 +35,7 @@ export function WithdrawForm({ BONK: 5, JIM: 9, GODL: 11, - Hustle: 9, + HUSTLE: 9, } return decimals[token] || 9 } From 5140a3e19eb570075037766faaaed6e414120299 Mon Sep 17 00:00:00 2001 From: Shannon Code Date: Mon, 1 Dec 2025 15:27:42 -0500 Subject: [PATCH 3/3] Use token mint address instead of symbol for deposit/withdraw - Import TokenUtils and TokenSymbol from @radr/shadowwire - Use TokenUtils.getTokenMint() to get actual mint CA for API calls --- components/DepositForm.tsx | 4 ++-- components/WithdrawForm.tsx | 4 ++-- package-lock.json | 1 - package.json | 1 - 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/components/DepositForm.tsx b/components/DepositForm.tsx index 12ba36c..bd37666 100644 --- a/components/DepositForm.tsx +++ b/components/DepositForm.tsx @@ -1,7 +1,7 @@ 'use client' import { useState } from 'react' -import { ShadowWireClient } from '@radr/shadowwire' +import { ShadowWireClient, TokenUtils, TokenSymbol } from '@radr/shadowwire' import { useWallet, useConnection } from '@solana/wallet-adapter-react' import { Transaction, VersionedTransaction } from '@solana/web3.js' @@ -70,7 +70,7 @@ export function DepositForm({ const response = await client.deposit({ wallet: walletAddress, amount: amountInSmallestUnit, - token_mint: selectedToken, + token_mint: TokenUtils.getTokenMint(selectedToken as TokenSymbol), }) console.log('Deposit response:', response) diff --git a/components/WithdrawForm.tsx b/components/WithdrawForm.tsx index 6a52946..2b465fe 100644 --- a/components/WithdrawForm.tsx +++ b/components/WithdrawForm.tsx @@ -1,7 +1,7 @@ 'use client' import { useState } from 'react' -import { ShadowWireClient } from '@radr/shadowwire' +import { ShadowWireClient, TokenUtils, TokenSymbol } from '@radr/shadowwire' import { useWallet, useConnection } from '@solana/wallet-adapter-react' import { Transaction, VersionedTransaction } from '@solana/web3.js' @@ -76,7 +76,7 @@ export function WithdrawForm({ const response = await client.withdraw({ wallet: walletAddress, amount: amountInSmallestUnit, - token_mint: selectedToken, + token_mint: TokenUtils.getTokenMint(selectedToken as TokenSymbol), }) console.log('Withdraw response:', response) diff --git a/package-lock.json b/package-lock.json index 346b5fa..c7ecb0d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1657,7 +1657,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/@radr/shadowwire/-/shadowwire-1.0.0.tgz", "integrity": "sha512-IWisS2o5iAmkw8YkJ67P2b8ET34gB81gqL3iaMWoPC+rfFjDR8B1NDH//YHWWEOiVZFfw/sZy83/rAeyMaHI2w==", - "license": "MIT", "dependencies": { "@solana/web3.js": "^1.95.3" } diff --git a/package.json b/package.json index 88008c2..8e8d182 100644 --- a/package.json +++ b/package.json @@ -29,4 +29,3 @@ "typescript": "^5.3.3" } } -