UNPKG

@sofaws/dapp-core

Version:

A library to hold the main logic for a dapp on the Elrond Network

3 lines (2 loc) 1.9 kB
import{r as l,s as x}from"./chunk-ZR7YL3KO.js";import{i as y}from"./chunk-7QE2X3X4.js";import{m as g}from"./chunk-HBP5N4FR.js";g();x();y();import L from"bignumber.js";var N=e=>{var r,s,t,a,n,i,u,m,o,d,p,c;switch(e.name){case"claimLockedAssets":return["Claim locked assets"];case"enterFarm":case"enterFarmProxy":return["Enter farm with",{token:(r=e.arguments)==null?void 0:r.transfers}];case"enterFarmAndLockRewards":case"enterFarmAndLockRewardsProxy":return["Enter farm and lock rewards with",{token:(s=e.arguments)==null?void 0:s.transfers}];case"exitFarm":case"exitFarmProxy":return["Exit farm with",{token:(t=e.arguments)==null?void 0:t.transfers}];case"claimRewards":case"claimRewardsProxy":return["Claim rewards",{token:(a=e.arguments)==null?void 0:a.transfers}];case"compoundRewards":case"compoundRewardsProxy":return["Reinvest rewards",{token:(n=e.arguments)==null?void 0:n.transfers}];case"swapTokensFixedInput":case"swap":return e.description?[e.description]:[];case"swapTokensFixedOutput":return e.description?[e.description]:[];case"addLiquidity":case"addLiquidityProxy":return["Added liquidity for",{token:[(i=e.arguments)==null?void 0:i.transfers[0]]},"and",{token:[(u=e.arguments)==null?void 0:u.transfers[1]]}];case"removeLiquidity":case"removeLiquidityProxy":return["Removed liquidity with ",{token:(m=e.arguments)==null?void 0:m.transfers}];case"mergeLockedAssetTokens":let f=l;if((o=e.arguments)!=null&&o.transfers){let w=e.arguments.transfers.map(({value:k})=>k);f=L.sum.apply(null,w).toString(10)}return[`Merge ${(d=e.arguments)==null?void 0:d.transfers.length}`,{tokenNoLink:[(p=e.arguments)==null?void 0:p.transfers[0]]},"positions into a single",{tokenNoLink:[(c=e.arguments)==null?void 0:c.transfers[0]]},"position of value",{value:f}];case"wrapEgld":case"unwrapEgld":default:return e.description?[e.description]:[]}};export{N as a}; //# sourceMappingURL=chunk-B4LG6YDI.js.map