Skip to content

Commit

Permalink
fix: tranfer amount can be 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Xaber20110202 committed Mar 7, 2022
1 parent 5966d24 commit 348eabf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const checkItem = (itemName: string, param?: unknown): void => {
if (param === null || param === undefined || param === '' || param === 0) {
throw new Error(cases[itemName])
}
if (itemName === 'amount' && !((param as number) > 0)) {
if (itemName === 'amount' && !((param as number) >= 0)) {
throw new Error(ERRORS.INVALID_AMOUNT)
}
const actions = [
Expand Down

0 comments on commit 348eabf

Please sign in to comment.