@frak-labs/core-sdk
Version:
Core SDK of the Frak wallet, low level library to interact directly with the frak ecosystem.
16 lines (14 loc) • 403 B
text/typescript
import type { Currency, TokenAmountType } from "../../types";
/**
* Get the currency amount key for a given currency
* @param currency - The currency to use
* @returns The currency amount key
*/
export function getCurrencyAmountKey(
currency?: Currency
): keyof TokenAmountType {
if (!currency) {
return "eurAmount";
}
return `${currency}Amount` as keyof TokenAmountType;
}