types#SyrupBasic TypeScript Examples

The following examples show how to use types#SyrupBasic. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.ts    From interface-v2 with GNU General Public License v3.0 6 votes vote down vote up
export function returnSyrupInfo(
  isOld?: boolean,
): {
  [chainId in ChainId]?: SyrupBasic[];
} {
  const syrupInfo = isOld ? stakeData.oldsyrup : stakeData.syrup;
  return {
    [ChainId.MATIC]: syrupInfo.map((info) => {
      return {
        ...info,
        token: returnTokenFromKey(info.token),
        baseToken: returnTokenFromKey(info.baseToken),
        stakingToken: returnTokenFromKey(info.stakingToken),
      };
    }),
  };
}
Example #2
Source File: index.ts    From interface-v2 with GNU General Public License v3.0 5 votes vote down vote up
export function getSyrupLPToken(info: SyrupBasic | SyrupInfo) {
  const lp = info.lp;
  if (lp && lp !== '') return new Token(137, lp, 18, 'SLP', 'Staked LP');
  return info.stakingToken;
}