From 0104873f5a5031eba38335cf5dd05baff26f9dbe Mon Sep 17 00:00:00 2001 From: BoHsuu <115441679+Huygon764@users.noreply.github.com> Date: Wed, 11 Mar 2026 15:41:32 +0700 Subject: [PATCH 01/18] refactor: improve layout and responsiveness in Quest and Batch components (#200) - Updated QuestPage layout for better responsiveness with max-width and padding adjustments. - Changed BatchTransactions and TransactionSummary components to use flexbox for improved item alignment and responsiveness. - Enhanced QuestCard to allow for flexible width. - Added titles for new routes in the Title component. --- .../components/Batch/BatchContainer.tsx | 6 +--- .../components/Batch/TransactionSummary.tsx | 31 +++++-------------- 2 files changed, 9 insertions(+), 28 deletions(-) diff --git a/packages/nextjs/components/Batch/BatchContainer.tsx b/packages/nextjs/components/Batch/BatchContainer.tsx index e8ccad3..c519e4d 100644 --- a/packages/nextjs/components/Batch/BatchContainer.tsx +++ b/packages/nextjs/components/Batch/BatchContainer.tsx @@ -179,11 +179,7 @@ function BatchTransactions({ {/* Recipient */}
{title}
++ Please review the information below and confirm to make the transaction. +
++ Dev: Register Mixer VK (run once before deploy) +
+vkHash (copy to contracts-config.ts):
+
+ {vkHash}
+
+ {error}
} ++ Deposit from your personal wallet. Your deposit is unlinkable to your withdrawal. +
+ {!MIXER_SUPPORTED_CHAIN_IDS.includes(chainId as any) && ( +Switch to Horizen testnet or Base Sepolia to use the mixer.
+ )} + {!mixerDeployed && MIXER_SUPPORTED_CHAIN_IDS.includes(chainId as any) && ( +Mixer contract is not deployed on this network yet.
+ )} + ++ Deposit from your wallet, then withdraw to a different address. On-chain link between deposit and withdrawal is + broken. +
+ +- Dev: Register Mixer VK (run once before deploy) -
+Dev: Register Mixer VK (run once before deploy)
vkHash (copy to contracts-config.ts):
-
- {vkHash}
-
+ {vkHash}
{error}
} diff --git a/packages/nextjs/components/Mixer/WithdrawTab.tsx b/packages/nextjs/components/Mixer/WithdrawTab.tsx new file mode 100644 index 0000000..ff6d835 --- /dev/null +++ b/packages/nextjs/components/Mixer/WithdrawTab.tsx @@ -0,0 +1,216 @@ +"use client"; + +import React, { useState } from "react"; +import { PoolStats } from "./PoolStats"; +import { getContractConfigByChainId, getTokenBySymbol } from "@polypay/shared"; +import { useAccount } from "wagmi"; +import { MIXER_DENOMINATIONS, MIXER_SUPPORTED_CHAIN_IDS } from "~~/configs/mixer.config"; +import { useMyAccounts } from "~~/hooks"; +import type { MixerDepositSlot } from "~~/hooks/app/useMixerKeys"; +import { useMixerWithdraw } from "~~/hooks/app/useMixerWithdraw"; +import { notification } from "~~/utils/scaffold-eth"; + +const TOKEN_KEYS = ["ETH", "ZEN", "USDC"] as const; + +export function WithdrawTab() { + const { chain } = useAccount(); + const chainId = chain?.id ?? MIXER_SUPPORTED_CHAIN_IDS[0]; + const [tokenKey, setTokenKey] = useState<"ETH" | "ZEN" | "USDC">("ETH"); + const [denomination, setDenomination] = useState+ Withdraw to your multisig (or any address). Relayer submits the transaction so the link is broken. +
+ {!mixerDeployed && MIXER_SUPPORTED_CHAIN_IDS.includes(chainId as any) && ( +Mixer contract is not deployed on this network yet.
+ )} + ++ No withdrawable deposits for this pool, or click "Load my deposits" to scan. +
+ )} +