@multiversx/sdk-dapp-swap
Version:
A library to hold the main logic for swapping between tokens on the MultiversX blockchain
3 lines (2 loc) • 379 B
JavaScript
import{f as p}from"./chunk-5W737WN4.js";p();var g=({activeRoute:c})=>{let{pricesImpact:a,smartSwap:t,pairs:i}=c;if(t){let e=[];return t.routes.forEach((r,u)=>{let{pairs:s,pricesImpact:m}=r,o=s.map((n,P)=>({pair:n,priceImpactPercentage:m[P]}));e.push(...o)}),e}return i.map((e,r)=>({pair:e,priceImpactPercentage:a[r]}))};export{g as a};
//# sourceMappingURL=chunk-PQYUK3PK.js.map