major refactor of web store into vue setup style declaration; reactivity debugging; order view has known refresh issues

This commit is contained in:
Tim Olson
2023-11-27 00:52:17 -04:00
parent 41457b85f5
commit d2db5dc4f7
24 changed files with 545 additions and 364 deletions

View File

@@ -59,23 +59,3 @@ export function routeInverted(route) {
return route && (route.token0 === s.tokenA) === s.inverted
}
export function isEmpty(v) {
return v === null || typeof v === 'string' && v.trim() === ''
}
export function validateRequired(v) {
if (isEmpty(v))
return 'Required'
return true
}
export function validateAmount(v) {
if (isEmpty(v))
return true
const floatRegex = /^-?\d*(?:[.,]\d*?)?$/
if (!floatRegex.test(v))
return 'Amount must be a number'
if (parseFloat(v) <= 0)
return 'Amount must be positive'
return true
}