UNPKG

@sofaws/dapp-core

Version:

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

3 lines (2 loc) 619 B
import{a as p}from"./chunk-V4XSYEH7.js";import{e as u,f as a,p as m,s as c}from"./chunk-ZR7YL3KO.js";import{m as s}from"./chunk-HBP5N4FR.js";s();c();import n from"bignumber.js";var f=e=>{var r,t;if(!((r=e.receipt)!=null&&r.value))return"";if(((t=e.receipt)==null?void 0:t.data)===m){let i=p({input:e.receipt.value,decimals:u,digits:a,showLastNonZeroDecimal:!0});return new n(i).times(e.gasPrice).times(100).toFixed()}return e.receipt.value};function D(e){var o;let r=(o=e.receipt)==null?void 0:o.data;if(!r)return"";let t=f(e),i=t?`: ${t}`:"";return`${r}${i}`}export{D as a}; //# sourceMappingURL=chunk-TBQFSFXY.js.map