PageSourceSearch

https://anicana.org/assets/index-LV1FJ7_R.js

js anicana.org collected 2026-10-04 17:35:46 UTC 2,863 bytes, 1 lines download raw bytes

1import{r as a,e as B,j as e,z as D}from"./vendor-4IvLmjQQ.js";import{W as G,a5 as U,M as X,z as A,d as O,a3 as Y}from"./index-B506DBWO.js";import{T as $}from"./transaction-Z0kAX5YL.js";import{T as u}from"./transactionService-DuOtH7D7.js";import"./wallet-anima-CjcTr6SU.js";import"./wallet-shard-45c29iwf.js";import"./wallet-levica-GykOhSDo.js";const n={root:{overflow:"hidden",height:"100vh"},wrapper:{position:"absolute",top:19,bottom:0,left:0,right:0,overflowX:"hidden",overflowY:"auto",height:"calc(100vh - 81px)",paddingBottom:D?240:73,zIndex:1},header:{paddingLeft:22,paddingRight:22,marginBottom:20,fontFamily:"acumin-pro",fontStyle:"italic",position:"fixed",top:75,zIndex:3,height:29,maxWidth:393},headerGradient:{height:40,background:"linear-gradient(0deg, rgba(0,0,0,0.16) 0%, rgba(0,0,0,1) 67%, rgba(0,0,0,1) 100%)",width:"100%",maxWidth:393,position:"fixed",top:65,zIndex:2},searchbox:{width:213,height:29},total:{fontFamily:"acumin-pro",fontSize:21,fontWeight:600,fontStyle:"italic",color:"#DCC97E",marginRight:21}};let f;const tt=()=>{const{wallet_address:s}=a.useContext(G),[b,m]=a.useState([]),[j,I]=a.useState(!1),[d,x]=a.useState(""),[i,L]=a.useState(""),[_,p]=a.useState(!0),[F,l]=a.useState(0),[k,z]=a.useState(),E=B(),g=async(t,r,h)=>{var y,S,T,w;if(t){const c=await u.getTransactionHistory(t,r,h);if(c.ok){const v=((y=c.data)==null?void 0:y.data)||[],C=v.filter(o=>!o.is_read).map(o=>o.tx_id);C.length>0&&H(C).then(o=>{o.ok||console.error("Failed to mark transactions as read:",o.error)}),m(v),I(!i&&!!((S=c.data)!=null&&S.has_next_tx_history)),i||x(((T=c.data)==null?void 0:T.last_transaction_id)||""),z(((w=c.data)==null?void 0:w.total)||0),p(!1)}}},N=()=>{console.log("onChangeLastIdFnc",{wallet_address:s,lastId:d}),l(t=>t+1)};a.useEffect(()=>(s&&l(t=>t+1),()=>{p(!0),m([])}),[s]),U(()=>{i?g(s,d,i):g(s,d)},[F]);const W=async()=>await u.updateTxLastSeenDate(),H=async t=>await u.updateTxReadStatus(t);a.useEffect(()=>{W()},[]);const M=t=>{f&&clearTimeout(f),f=setTimeout(()=>{L(t.target.value),x(""),l(r=>r+1)},1e3)},R=()=>E("/wallet",{replace:!0});return e.jsx(X,{mainClassName:"position-relative",style:n.root,title:"TX History",backButton:!0,onClickTitle:R,walletActive:!0,titleOnly:!0,bottomNav:!1,children:e.jsxs("div",{style:n.wrapper,children:[e.jsx("div",{style:n.headerGradient}),e.jsxs("div",{style:n.header,className:"w-100 d-flex flex-row align-items-center justify-content-between",children:[e.jsx(A,{style:n.searchbox,onChange:M}),e.jsx("div",{}),e.jsx("span",{style:n.total,children:k})]}),_?e.jsx(O,{}):e.jsx(Y,{isSearch:!!i,lastId:d,changeLastIdFnc:N,hasMore:j,newItems:b,limit:10,useLastId:!0,renderedContainerClassName:"row p-x-22 p-t-49",renderedComponent:(t,r,h)=>e.jsx("div",{className:"col-12 m-b-20",ref:h,children:e.jsx($,{transaction:t,wallet_address:s})},`transaction_item_${r}`)})]})})};export{tt as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.