Commit c44a5d25 by Arjun Jhukal

made the minimum and maxmimum deposit and withdraw dynamic and also added the…

made the minimum and maxmimum deposit and withdraw dynamic and also added the site visibility control at admin
parent f378dad0
...@@ -41,10 +41,10 @@ export default function TransactionLimits() { ...@@ -41,10 +41,10 @@ export default function TransactionLimits() {
onSubmit: async (values) => { onSubmit: async (values) => {
try { try {
const response = await updateLimits({ const response = await updateLimits({
min_deposit: values.min_deposit === "" ? null : values.min_deposit, min_deposit: values.min_deposit?.toString() === "" ? null : values.min_deposit,
max_deposit: values.max_deposit === "" ? null : values.max_deposit, max_deposit: values.max_deposit?.toString() === "" ? null : values.max_deposit,
min_withdrawal: values.min_withdrawal === "" ? null : values.min_withdrawal, min_withdrawal: values.min_withdrawal?.toString() === "" ? null : values.min_withdrawal,
max_withdrawal: values.max_withdrawal === "" ? null : values.max_withdrawal, max_withdrawal: values.max_withdrawal?.toString() === "" ? null : values.max_withdrawal,
}).unwrap(); }).unwrap();
dispatch(showToast({ message: response.message || "Saved successfully", variant: ToastVariant.SUCCESS })); dispatch(showToast({ message: response.message || "Saved successfully", variant: ToastVariant.SUCCESS }));
} catch (e: any) { } catch (e: any) {
......
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