Added quick comments about code
This commit is contained in:
@@ -20,7 +20,14 @@ export const names = [
|
||||
"Walter",
|
||||
];
|
||||
|
||||
/* This function adds faucet account to application global state.
|
||||
* It calls the /api/faucet endpoint which in send a HTTP POST to
|
||||
* https://hooks-testnet.xrpl-labs.com/newcreds and it returns
|
||||
* new account with 10 000 XRP. Hooks Testnet /newcreds endpoint
|
||||
* is protected with CORS so that's why we did our own endpoint
|
||||
*/
|
||||
export const addFaucetAccount = async (showToast: boolean = false) => {
|
||||
// Lets limit the number of faucet accounts to 5 for now
|
||||
if (state.accounts.length > 4) {
|
||||
return toast.error("You can only have maximum 5 accounts");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user