UNPKG

@rarimo/swap

Version:

Internal tools that other Rarimo packages use to swap tokens.

20 lines (19 loc) 682 B
import { SwapCommands } from "../../../enums"; export const getSameChainBundleData = (isBridgingRequired, bundle)=>{ if (isBridgingRequired) return []; return buildSameChainBundleData(bundle); }; export const buildSameChainBundleData = ({ bundle } = {})=>{ if (!bundle) return []; // If bridging is not required and a bundle is provided, thus we need to execute // a bundle on the same chain. To execute the transaction bundle on the same // chain, we need to use multicall return [ { command: SwapCommands.Multicall, skipRevert: false, data: bundle } ]; }; //# sourceMappingURL=same-chain.js.map