( inputAmount, decimals: bigint = BigInt(18), )
| 75 | } |
| 76 | |
| 77 | export const checkAmountOverflow = ( |
| 78 | inputAmount, |
| 79 | decimals: bigint = BigInt(18), |
| 80 | ) => { |
| 81 | try { |
| 82 | if (!inputAmount) { |
| 83 | return true; |
| 84 | } |
| 85 | const clipDecimals = maxDecimals(inputAmount, decimals); |
| 86 | parseUnits(clipDecimals, decimals); |
| 87 | return true; |
| 88 | } catch (e) { |
| 89 | return false; |
| 90 | } |
| 91 | }; |
| 92 | |
| 93 | export const formatUTCDate = (date, needSub?: boolean) => { |
| 94 | let finalDate = date; |
nothing calls this directly
no test coverage detected