mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-06-12 13:21:02 +00:00
Fix USDT swap insufficient balance bug
Root cause: Token symbol mismatch between TokenSwap component and WalletContext - WalletContext stored balance with key 'USDT' - TokenSwap used symbol 'wUSDT' for lookups - This caused balances['wUSDT'] to return undefined - Triggered false "insufficient balance" errors Changes: - Updated TokenSwap.tsx to use 'USDT' symbol consistently - Fixed token symbol in AVAILABLE_TOKENS array - Updated asset ID mapping in swap transaction logic - Fixed swap history token display Also includes: - Added new DEX components (SwapInterface, PoolBrowser, etc.) - Added TypeScript type definitions for DEX - Added DEX utility functions - Removed obsolete test scripts - Updated WalletContext with USDT balance support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+10
-1
@@ -6,7 +6,15 @@ import path from "path";
|
||||
export default defineConfig(({ mode }) => ({
|
||||
server: {
|
||||
host: "::",
|
||||
port: 8080,
|
||||
port: 8081,
|
||||
hmr: {
|
||||
protocol: 'ws',
|
||||
host: 'localhost',
|
||||
port: 8081,
|
||||
},
|
||||
watch: {
|
||||
usePolling: true,
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
react()
|
||||
@@ -14,6 +22,7 @@ export default defineConfig(({ mode }) => ({
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "./src"),
|
||||
"@pezkuwi/i18n": path.resolve(__dirname, "../shared/i18n"),
|
||||
},
|
||||
},
|
||||
json: {
|
||||
|
||||
Reference in New Issue
Block a user