@multiversx/sdk-dapp 2.14.12 → 2.14.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multiversx/sdk-dapp",
3
- "version": "2.14.12",
3
+ "version": "2.14.13",
4
4
  "description": "A library to hold the main logic for a dapp on the MultiversX blockchain",
5
5
  "author": "MultiversX",
6
6
  "license": "GPL-3.0-or-later",
@@ -1,2 +0,0 @@
1
- import{b as t}from"./chunk-NV5J2IHR.js";import{a as I}from"./chunk-QR4CJZ7F.js";import{a as G}from"./chunk-RLCDJI3M.js";import{a as w}from"./chunk-CHMU2ZJI.js";import{a as l,b as T,m as k}from"./chunk-HBP5N4FR.js";k();import n,{useEffect as tn,useState as D}from"react";import{faArrowLeft as en,faTimes as sn}from"@fortawesome/free-solid-svg-icons";import{FontAwesomeIcon as H}from"@fortawesome/react-fontawesome";import i from"classnames";var bn=v=>{let{onSignTransaction:E,handleClose:F,onPrev:M,GuardianScreen:a,title:W,waitingForDevice:u,currentTransaction:o,error:x,allTransactions:r,isLastTransaction:A,currentStep:e,className:O,signStepInnerClasses:y}=v,[p,C]=D(!1),[g,j]=D({});if(!o)return null;let c=o.transaction.getNonce().valueOf();tn(()=>{let f=Object.keys(g).includes(c.toString()),R=Object.values(g).includes(e);f||R||j(nn=>T(l({},nn),{[c]:e}))},[c,e]);let V=o.transaction.getData().toString(),{buttonsWrapperClassName:$,buttonClassName:b}=y||{},{type:z,multiTxData:N}=o.transactionTokenInfo,q=e===0,h=f=>{f.preventDefault(),q?F():M()},B=A&&!u,J=()=>{if(E(),B&&a)return C(!0)},K=z&&N&&!V.endsWith(N),s="Sign & Continue";s=u?"Check your Ledger":s,s=B?"Sign & Submit":s,s=K?"Continue":s;let d={currentTransaction:o,error:x,allTransactions:r,currentStep:e,isGuarded:Boolean(a),signStepInnerClasses:y},P=()=>{C(!1)},Q=r.length>1?"Sign Transactions":"Sign Transaction",U=r.length>1?"Confirm Transactions":"Confirm Transaction",X=r.length>1?`Signing Transaction ${e+1} of ${r.length}`:W||"Sign Transaction",m=a&&p,Y=m?"Verify Guardian":X,Z=[{title:Q,active:!p},{title:U,active:p,hidden:!d.isGuarded}],_=o.receiverScamInfo,S=G(_),L=g[c]===e;return n.createElement("div",{className:i(t.modalLayoutContent,t.spaced,O,{[t.guarded]:d.isGuarded})},m&&n.createElement("div",{onClick:P,className:i(t.modalLayoutHeadingIcon,t.back)},n.createElement(H,{icon:en})),n.createElement("div",{onClick:h,className:i(t.modalLayoutHeadingIcon,t.close)},n.createElement(H,{icon:sn})),d.isGuarded&&n.createElement(w,{steps:Z,type:"detailed",size:"small"}),n.createElement("div",{className:t.title,"data-testid":"signStepTitle"},Y||"Confirm on Ledger"),m?n.createElement(a,T(l({},v),{onPrev:P,guardianFormDescription:"Enter the code from your Authenticator app to verify this transaction."})):n.createElement(n.Fragment,null,n.createElement(I,l({},d)),n.createElement("div",{className:i(S.buttonsWrapper,$)},n.createElement("button",{id:"closeButton","data-testid":"closeButton",onClick:h,className:i(S.cancelButton,b)},e===0?"Cancel":"Back"),n.createElement("button",{type:"button",className:i(S.signButton,b),id:"signBtn","data-testid":"signBtn",onClick:J,disabled:u||!L},L?s:"Loading..."))))};export{bn as a};
2
- //# sourceMappingURL=chunk-XEALJBG2.js.map