Convert token amount (smallest unit) to USD, assuming 1 USDC = 1 USD
(amount: string)
| 27 | |
| 28 | /** Convert token amount (smallest unit) to USD, assuming 1 USDC = 1 USD */ |
| 29 | function tokenAmountToUSD(amount: string): number { |
| 30 | return parseInt(amount, 10) / 10 ** USDC_DECIMALS |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Parse the X-Payment-Required header from a 402 response. |
no outgoing calls
no test coverage detected