Start credit Api for Dollar acc
This commit is contained in:
@@ -6,10 +6,17 @@ import InputCom from "../Helpers/Inputs/InputCom";
|
||||
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
||||
import AddFundDollars from "./AddFundDollars";
|
||||
|
||||
function AddFundPop({ _payment, input, setInput, onClose, setConfirmCredit }) {
|
||||
function AddFundPop({
|
||||
_payment,
|
||||
input,
|
||||
setInput,
|
||||
onClose,
|
||||
setConfirmCredit,
|
||||
walletItem,
|
||||
}) {
|
||||
const navigate = useNavigate();
|
||||
const apiCall = new usersService();
|
||||
|
||||
let countryWallet = walletItem?.country;
|
||||
const { payment, currency } = _payment;
|
||||
|
||||
const [inputError, setInputError] = useState("");
|
||||
@@ -38,8 +45,8 @@ function AddFundPop({ _payment, input, setInput, onClose, setConfirmCredit }) {
|
||||
}
|
||||
|
||||
let stateData = {
|
||||
amount: Number(input),
|
||||
currency: currency.toUpperCase(),
|
||||
amount: Number(input) * 100,
|
||||
currency: walletItem?.code,
|
||||
};
|
||||
|
||||
try {
|
||||
@@ -92,10 +99,11 @@ function AddFundPop({ _payment, input, setInput, onClose, setConfirmCredit }) {
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{currency === "US Dollars" && (
|
||||
{countryWallet === "US" && (
|
||||
<div className="w-full md:px-8 md:pt-4 px-4 pt-2 bg-white dark:bg-dark-white rounded-2xl">
|
||||
<AddFundDollars
|
||||
setInputError={setInputError}
|
||||
walletItem={walletItem}
|
||||
input={input}
|
||||
setInput={setInput}
|
||||
currency={currency}
|
||||
@@ -105,9 +113,9 @@ function AddFundPop({ _payment, input, setInput, onClose, setConfirmCredit }) {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{currency !== "US Dollars" && <div className="h-[18rem]"></div>}
|
||||
{countryWallet == "NG" && <div className="h-[18rem]"></div>}
|
||||
|
||||
{currency !== "US Dollars" && (
|
||||
{countryWallet == "NG" && (
|
||||
<div className="md:p-8 p-4 add-fund-btn flex justify-end items-center py-4 gap-4">
|
||||
<button
|
||||
className="px-4 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
|
||||
|
||||
Reference in New Issue
Block a user