This commit is contained in:
fmtabbara
2021-09-12 00:40:53 +01:00
parent 55561fe1f7
commit bacbd3dfce
+3 -4
View File
@@ -20,6 +20,9 @@ export const validateAmount = async (
minimum: string
): Promise<boolean> => {
// tests basic coin value requirements, like no more than 6 decimal places, value lower than total supply, etc
if (!Number(amount)) {
return false
}
try {
const minorValueStr: Coin = await invoke('major_to_minor', {
@@ -42,10 +45,6 @@ export const validateAmount = async (
}
export const basicRawCoinValueValidation = (rawAmount: string): boolean => {
if (!Number(rawAmount)) {
return false
}
debugger
const amountFloat = parseFloat(rawAmount)
// it cannot have more than 6 decimal places