UNPKG

@sofaws/dapp-core

Version:

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

3 lines (2 loc) 699 B
import{a as s}from"./chunk-7VHHGW4T.js";import{a as u}from"./chunk-OI3JNSRI.js";import{h as i}from"./chunk-7QE2X3X4.js";import{m as o}from"./chunk-HBP5N4FR.js";o();u();import{useEffect as m,useState as p}from"react";var D=[{label:"Raw",value:"raw"},{label:"Text",value:"text"},{label:"Decimal",value:"decimal"},{label:"Smart",value:"smart"}],E=({value:c,initialDecodeMethod:e,setDecodeMethod:a,identifier:r})=>{let[t,n]=p(e&&Object.values(i).includes(e)?e:"raw"),{displayValue:l,validationWarnings:d}=s({input:c,decodeMethod:t,identifier:r});return m(()=>{a&&a(t)},[t]),{displayValue:l,validationWarnings:d,setActiveKey:n,decodeOptions:D}};export{E as a}; //# sourceMappingURL=chunk-PVAK2QRW.js.map