Commit 6fdca58c by Arjun Jhukal

updated the new changes as requested on crm

parent 71c3d8d1
......@@ -102,7 +102,7 @@ export default function UserCoinCard() {
>
<SilverCoinIcon />
<div className="coins">
<strong className="text-[12px] leading-4 font-[600] text-[#93E0D8] block">{sweepsCoin.providers.length ? sweepsCoin.providers.reduce((acc, item) => acc + Number(item.balance), 0) : 0}</strong>
<strong className="text-[12px] leading-4 font-[600] text-[#93E0D8] block">{sweepsCoin.providers.length ? sweepsCoin.providers.reduce((acc, item) => acc + Number(item.balance), 0).toFixed(2) : 0}</strong>
<span className="text-[9px] mt-[-2px] hidden md:block">Sweeps Coins</span>
</div>
</Box>
......@@ -127,7 +127,7 @@ export default function UserCoinCard() {
<div className="header flex justify-start items-center gap-4 border-b border-[rgba(255,255,255,0.1)] pb-3 mb-6 ">
<SilverCoinIcon />
<div className="coin-detail ">
<h2 className="text-[24px] leading-[120%] text-white">{sweepsCoin.providers.length ? sweepsCoin.providers.reduce((acc, item) => acc + Number(item.balance), 0) : 0}</h2>
<h2 className="text-[24px] leading-[120%] text-white">{sweepsCoin.providers.length ? sweepsCoin.providers.reduce((acc, item) => acc + Number(item.balance), 0).toFixed(2) : 0}</h2>
<p className="text-[11px] text-[rgba(255,255,255,0.8)]">Sweeps Coins</p>
</div>
<IconButton onClick={() => refetch()} disabled={isLoading || isFetching}>
......
......@@ -182,13 +182,17 @@ export default function WithdrawlModal({
onClick={() => handleTypeChange(option?.destination_token)}
>
<span className="text-[12px] flex items-center justify-start gap-2 max-w-[80%] text-start">
<BitcoinRefresh />
{option.thumbnail_url ? <Image src={option?.thumbnail_url} alt={option?.name} className="w-6 h-6 object-contain" /> : <BitcoinRefresh />}
<span>
{option?.name}
<span className="text-[#FBA027] text-[12px] block">(Fee ${option.fee})</span>
</span>
</span>
{formik.values.type === option?.destination_token ? (
<TickCircle className="text-green-400" />
) : ""}
</div>
</GlassWrapper>
</div>
))
......
......@@ -17,11 +17,11 @@ import WithdrawlModal from "./WithdrawlModal";
const validationSchema = Yup.object({
withdrawl_amounts: Yup.object().test(
"min-amount",
"Amount must be greater than $2",
"Amount must be greater than $40",
(value) => {
if (!value) return true;
return Object.values(value).every(
(v) => v === "" || Number(v) >= 2
(v) => v === "" || Number(v) >= 40
);
}
),
......@@ -156,10 +156,10 @@ export default function WithdrawlPage({
};
const handleWithdrawClick = (balance: number, provider: string) => {
if (balance < 2) {
if (balance < 40) {
dispatch(
showToast({
message: "Insufficient balance to withdraw (Min $2 required)",
message: "Withdraw Amount must be at least $40",
variant: ToastVariant.ERROR,
})
);
......@@ -183,8 +183,8 @@ export default function WithdrawlPage({
console.log("Formik Errors:", formik.values.withdrawl_amounts);
return (
<section className="withdrawl__root">
<div className="section__title mb-4 lg:mb-8 max-w-[520px]">
<h1 className="mb-2 text-[24px] lg:text-[32px]">Withdraw Coins</h1>
<div className="section__title mb-4 lg:mb-8 max-w-[560px]">
<h1 className="mb-2 text-[24px] lg:text-[32px]">Withdraw Coins <span className="text-[#FBA027] text-[20px]">(Min Withdrawl $40)</span></h1>
<p className="text-[11px] lg:text-[13px]">
To start playing and cashing out your winnings, you'll need a crypto
wallet to purchase E-Credits and receive payouts. Don't worry—it's quick
......@@ -291,7 +291,7 @@ export default function WithdrawlPage({
}
</span>
)}
<span className="text-[8px] lg:text-[10px]">Min $2.0</span>
<span className="text-[8px] lg:text-[10px]">Min $40.0</span>
</div>
{/* Withdraw Button */}
......@@ -302,6 +302,7 @@ export default function WithdrawlPage({
color="secondary"
className="md:!max-w-fit !text-[#426A66]"
startIcon={<CardPos />}
// disabled={info.available < 40}
onClick={() => {
if (info?.has_changed_password) {
dispatch(openPasswordDialog({
......
......@@ -55,6 +55,7 @@ export interface MasspayPaymentMethods {
name: string;
destination_token: string;
fee: number;
thumbnail_url: string;
}
export interface MasspayPaymentFields {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment