Usage

import { getTotalPrices } from "@slicekit/core"

const { totalEthPrice, totalUsdcPrice, subtotalEth, subtotalUsdc } =
  await getTotalPrices({
    cart,
    ethUsd
  })

Parameters

ethUsd
bigint
required
Current ETH to USD rate, with 6 decimal places.

Return Type

totalEthPrice
bigint
Total price in ETH.
totalUsdcPrice
bigint
Total price in USDC.
subtotalEth
bigint
Subtotal price in ETH.
subtotalUsdc
bigint
Subtotal price in USDC.