UNPKG

@yoroi/swap

Version:
7 lines (6 loc) 326 B
"use strict"; export const getBestSwap = tokenOutPrice => (best, candidate) => { if (candidate.totalOutput - (tokenOutPrice > 0 ? candidate.totalFee / tokenOutPrice : 0) > best.totalOutput - (tokenOutPrice > 0 ? best.totalFee / tokenOutPrice : 0)) return candidate; return best; }; //# sourceMappingURL=getBestSwap.js.map