Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/mint-teth/utils/calculateMinimumMint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const WAD = {
*
* @param depositAmount - The amount to be deposited, represented as a bigint.
* @param rate - The rate at which the deposit amount is converted, represented as a bigint.
* @param mintSlippage - The slippage percentage to account for, represented as a number. Default is 0.5%.
* @param mintSlippage - The slippage percentage to account for, is represented as a number. Default is 0.5%.
* @returns The minimum mint amount after slippage, represented as a bigint.
*/
export function calculateMinimumMint(
Expand Down
4 changes: 2 additions & 2 deletions app/mint-teth/utils/sanitizeInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
*
* @param val - The new value entered by the user.
* @param currentDepositAmount - The current deposit amount in the input field.
* @returns The sanitized value to be set in the input field.
* @returns The sanitized value is to be set in the input field.
*/
export const sanitizeInput = (val: string, currentDepositAmount: string): string => {
// If the user presses the decimal point with an empty input, set the value to "0."
if (val === ".") {
return "0.";
}

// Replace single leading zero with the number pressed (if it's between 1-9)
// Replace the single leading zero with the number pressed (if it's between 1-9)
if (currentDepositAmount === "0" && parseInt(val) > 0 && parseInt(val) <= 9) {
return val.replace("0", "");
}
Expand Down