@yoroi/swap
Version:
The Swap package of Yoroi SDK
7 lines (6 loc) • 326 B
JavaScript
;
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