Merge pull request #258 from XRPLF/fix/acc-import-limit

Remove account import limit.
This commit is contained in:
muzamil
2022-07-22 14:43:01 +05:30
committed by GitHub

View File

@@ -28,12 +28,7 @@ export const names = [
* is protected with CORS so that's why we did our own endpoint
*/
export const addFaucetAccount = async (name?: string, showToast: boolean = false) => {
// Lets limit the number of faucet accounts to 5 for now
if (state.accounts.length > 5) {
return toast.error("You can only have maximum 6 accounts");
}
if (typeof window !== 'undefined') {
if (typeof window === undefined) return
const toastId = showToast ? toast.loading("Creating account") : "";
const res = await fetch(`${window.location.origin}/api/faucet`, {
@@ -62,7 +57,6 @@ export const addFaucetAccount = async (name?: string, showToast: boolean = false
version: '2'
});
}
}
};
// fetch initial faucets