( value: bigint, decimals: bigint = BigInt(18), )
| 64 | } |
| 65 | |
| 66 | export function BNToAmount( |
| 67 | value: bigint, |
| 68 | decimals: bigint = BigInt(18), |
| 69 | ): string { |
| 70 | try { |
| 71 | return formatUnits(value.toString(), decimals); |
| 72 | } catch (e) { |
| 73 | return "0"; |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | export const checkAmountOverflow = ( |
| 78 | inputAmount, |
nothing calls this directly
no outgoing calls
no test coverage detected