parent
94335d93f1
commit
299bb3891d
4 changed files with 2705 additions and 2 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -38,6 +38,7 @@ export function checkNumber(candidate: any) {
|
||||||
* @returns Valid
|
* @returns Valid
|
||||||
*/
|
*/
|
||||||
export function checkAmount(amount: string) {
|
export function checkAmount(amount: string) {
|
||||||
|
if (amount === '0') return true;
|
||||||
if (!checkString(amount) || !/^[1-9]{1}[0-9]{0,38}$/.test(amount)) return false;
|
if (!checkString(amount) || !/^[1-9]{1}[0-9]{0,38}$/.test(amount)) return false;
|
||||||
|
|
||||||
const candidate = new BigNumber(amount);
|
const candidate = new BigNumber(amount);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue