@multiversx/sdk-dapp-swap
Version:
A library to hold the main logic for swapping between tokens on the MultiversX blockchain
3 lines (2 loc) • 428 B
JavaScript
import{c as i}from"./chunk-2SSURZ7Z.js";import{a as m}from"./chunk-QXTSQDB3.js";import{f as E}from"./chunk-5W737WN4.js";E();var c=({pairs:a,identifier:t})=>{var e;if(t===i||t.startsWith(`W${i}-`))return m;let r;return a.forEach(({firstToken:s,secondToken:p})=>{if(s.identifier===t){r=s;return}if(p.identifier===t){r=p;return}}),(e=r==null?void 0:r.decimals)!=null?e:0};export{c as a};
//# sourceMappingURL=chunk-UVYLJEJI.js.map