Commit 6fdca58c by Arjun Jhukal

updated the new changes as requested on crm

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