Transaction

91d4d5d43bd2e8e7a89144fa36f87edaf5aa2b34acd2a285087f5cea84573e7f
Timestamp (utc)
2026-02-14 00:36:49
Fee Paid
0.00000996 BSV
(
0.00000996 BSV
-
0.00000000 BSV
)
Fee Rate
100.3 sat/KB
Version
1
Confirmations
2,904
Size Stats
9,922 B

1 Output

Total Output:
0.00000000 BSV
  • j"19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAutMÓ%"use strict";(self.webpackChunkfrithchain_client=self.webpackChunkfrithchain_client||[]).push([[888],{888(e,r,i){i.r(r),i.d(r,{default:()=>a});var t=i(43),d=i(475),o=i(722),n=i(272),s=i(579);const a=()=>{const{user:e,getAuthHeaders:r,isAuthenticated:i}=(0,n.A)(),[a,l]=(0,t.useState)([]),[c,u]=(0,t.useState)([]),[p,m]=(0,t.useState)([]),[g,x]=(0,t.useState)(!0),[h,y]=(0,t.useState)(null),[b,v]=(0,t.useState)(null),[f,j]=(0,t.useState)(null),[k,w]=(0,t.useState)(!1),[D,S]=(0,t.useState)(null),[R,C]=(0,t.useState)(""),B=(0,t.useCallback)(async()=>{if(i)try{x(!0);const e=r(),[i,t,d]=await Promise.all([o.A.get("/api/buyer/purchases",{headers:e}),o.A.get("/api/buyer/balance",{headers:e}),o.A.get("/api/buyer/disputes",{headers:e})]);l(i.data.purchases||[]),u(t.data.balances||[]),m(d.data.disputes||[]),y(null)}catch(d){var e,t;console.error("Error fetching data:",d),y((null===(e=d.response)||void 0===e||null===(t=e.data)||void 0===t?void 0:t.error)||"Failed to load data")}finally{x(!1)}else x(!1)},[i,r]);(0,t.useEffect)(()=>{B()},[B]);const A=e=>{if(!e||isNaN(e))return"0.00000000 BSV";return(e/1e8).toFixed(8)+" BSV"},z=e=>e.toLocaleString()+" sats";return e?(0,s.jsxs)("div",{style:{padding:"1rem",maxWidth:"1200px",margin:"0 auto"},children:[(0,s.jsx)("h1",{style:{marginBottom:"1.5rem"},children:"Buyer Dashboard"}),h&&(0,s.jsxs)("div",{style:{padding:"1rem",background:"#f8d7da",color:"#721c24",borderRadius:"4px",marginBottom:"1rem"},children:[h,(0,s.jsx)("button",{onClick:()=>y(null),style:{float:"right",background:"none",border:"none",cursor:"pointer"},children:"\xd7"})]}),f&&(0,s.jsxs)("div",{style:{padding:"1rem",background:"#d4edda",color:"#155724",borderRadius:"4px",marginBottom:"1rem"},children:[f,(0,s.jsx)("button",{onClick:()=>j(null),style:{float:"right",background:"none",border:"none",cursor:"pointer"},children:"\xd7"})]}),(0,s.jsxs)("div",{style:{background:"var(--bg-secondary)",padding:"1.5rem",borderRadius:"8px",marginBottom:"1.5rem"},children:[(0,s.jsx)("h2",{style:{marginBottom:"1rem"},children:"Your Balance"}),(0,s.jsxs)("div",{style:{display:"flex",gap:"2rem",flexWrap:"wrap"},children:[c.map(e=>(0,s.jsxs)("div",{style:{background:"var(--bg-primary)",padding:"1rem",borderRadius:"4px",minWidth:"200px"},children:[(0,s.jsx)("div",{style:{fontSize:"0.875rem",color:"var(--text-secondary)"},children:e.currency}),(0,s.jsx)("div",{style:{fontSize:"1.5rem",fontWeight:"bold"},children:"BSV"===e.currency?A(e.balance):e.balance}),e.pendingDeposits>0&&(0,s.jsxs)("div",{style:{fontSize:"0.75rem",color:"#856404"},children:["+",z(e.pendingDeposits)," pending"]})]},e.currency)),0===c.length&&(0,s.jsx)("div",{style:{color:"var(--text-secondary)"},children:"No balance yet"})]}),(0,s.jsx)("div",{style:{marginTop:"1rem"},children:(0,s.jsx)(d.N_,{to:"/deposit",style:{display:"inline-block",padding:"0.5rem 1rem",background:"var(--accent-primary)",color:"white",borderRadius:"4px",textDecoration:"none",fontSize:"0.875rem"},children:"Deposit Funds"})})]}),(0,s.jsxs)("div",{style:{background:"var(--bg-secondary)",padding:"1.5rem",borderRadius:"8px",marginBottom:"1.5rem"},children:[(0,s.jsxs)("h2",{style:{marginBottom:"1rem"},children:["Your Purchases (",a.length,")"]}),g?(0,s.jsx)("div",{children:"Loading..."}):0===a.length?(0,s.jsxs)("div",{style:{color:"var(--text-secondary)",textAlign:"center",padding:"2rem"},children:[(0,s.jsx)("p",{children:"You haven't made any purchases yet."}),(0,s.jsx)(d.N_,{to:"/",style:{color:"var(--accent-primary)"},children:"Browse Listings"})]}):(0,s.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"1rem"},children:a.map(e=>{const i=(e=>e.hasActiveDispute?{text:"Dispute Active",color:"#856404",bg:"#fff3cd"}:e.buyerConfirmedDelivery?{text:"Delivered & Confirmed",color:"#155724",bg:"#d4edda"}:"delivered"===e.deliveryStatus?{text:"Delivered - Confirm?",color:"#0c5460",bg:"#d1ecf1"}:"contract_deployed"===e.status?{text:"In Escrow",color:"#004085",bg:"#cce5ff"}:"funds_released"===e.status?{text:"Completed",color:"#155724",bg:"#d4edda"}:{text:e.status,color:"#6c757d",bg:"#e9ecef"})(e);return(0,s.jsxs)("div",{style:{background:"var(--bg-primary)",padding:"1rem",borderRadius:"4px",border:"1px solid var(--border-color)"},children:[(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",flexWrap:"wrap",gap:"1rem"},children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{style:{fontWeight:"bold",marginBottom:"0.25rem"},children:e.description||"Order ".concat(e.id)}),(0,s.jsxs)("div",{style:{fontSize:"0.875rem",color:"var(--text-secondary)"},children:["Tracking: ",e.trackingNumber]}),(0,s.jsxs)("div",{style:{fontSize:"0.875rem",color:"var(--text-secondary)"},children:["Amount: ",z(e.amount)]})]}),(0,s.jsx)("div",{style:{textAlign:"right"},children:(0,s.jsx)("span",{style:{display:"inline-block",padding:"0.25rem 0.75rem",borderRadius:"999px",fontSize:"0.75rem",fontWeight:"bold",color:i.color,background:i.bg},children:i.text})})]}),(0,s.jsxs)("div",{style:{marginTop:"1rem",display:"flex",gap:"0.5rem",flexWrap:"wrap"},children:[(0,s.jsx)(d.N_,{to:"/listing/".concat(e.id),style:{padding:"0.5rem 1rem",background:"var(--bg-secondary)",color:"var(--text-primary)",borderRadius:"4px",textDecoration:"none",fontSize:"0.875rem",border:"1px solid var(--border-color)"},children:"View Details"}),e.canConfirmDelivery&&(0,s.jsx)("button",{onClick:()=>(async e=>{if(window.confirm("Are you sure you want to confirm delivery? This will release funds to the vendor.")){v(e);try{const i=await o.A.post("/api/buyer/confirm/".concat(e),{},{headers:r()});i.data.success&&(j(i.data.message),B())}catch(d){var i,t;y((null===(i=d.response)||void 0===i||null===(t=i.data)||void 0===t?void 0:t.error)||"Failed to confirm delivery")}finally{v(null)}}})(e.id),disabled:b===e.id,style:{padding:"0.5rem 1rem",background:"#28a745",color:"white",borderRadius:"4px",border:"none",cursor:b===e.id?"wait":"pointer",fontSize:"0.875rem",opacity:b===e.id?.7:1},children:b===e.id?"Processing...":"Confirm Delivery"}),e.canRaiseDispute&&!e.hasActiveDispute&&(0,s.jsx)("button",{onClick:()=>{return r=e.id,S(r),C(""),void w(!0);var r},style:{padding:"0.5rem 1rem",background:"#dc3545",color:"white",borderRadius:"4px",border:"none",cursor:"pointer",fontSize:"0.875rem"},children:"Raise Dispute"}),e.hasActiveDispute&&e.disputeId&&(0,s.jsx)(d.N_,{to:"/dispute/".concat(e.disputeId),style:{padding:"0.5rem 1rem",background:"#ffc107",color:"#212529",borderRadius:"4px",textDecoration:"none",fontSize:"0.875rem"},children:"View Dispute"})]})]},e.id)})})]}),p.length>0&&(0,s.jsxs)("div",{style:{background:"var(--bg-secondary)",padding:"1.5rem",borderRadius:"8px"},children:[(0,s.jsxs)("h2",{style:{marginBottom:"1rem"},children:["Active Disputes (",p.length,")"]}),(0,s.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.5rem"},children:p.map(e=>(0,s.jsxs)("div",{style:{background:"var(--bg-primary)",padding:"1rem",borderRadius:"4px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{style:{fontWeight:"bold"},children:["Dispute ",e.id]}),(0,s.jsxs)("div",{style:{fontSize:"0.875rem",color:"var(--text-secondary)"},children:[e.reason.substring(0,50),"..."]})]}),(0,s.jsx)(d.N_,{to:"/dispute/".concat(e.id),style:{padding:"0.5rem 1rem",background:"var(--accent-primary)",color:"white",borderRadius:"4px",textDecoration:"none",fontSize:"0.875rem"},children:"View"})]},e.id))})]}),k&&(0,s.jsx)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:(0,s.jsxs)("div",{style:{background:"var(--bg-primary)",padding:"2rem",borderRadius:"8px",maxWidth:"500px",width:"90%"},children:[(0,s.jsx)("h3",{style:{marginBottom:"1rem"},children:"Raise a Dispute"}),(0,s.jsx)("p",{style:{marginBottom:"1rem",color:"var(--text-secondary)"},children:"Please describe the issue with your order. Provide as much detail as possible."}),(0,s.jsx)("textarea",{value:R,onChange:e=>C(e.target.value),placeholder:"Describe the problem...",style:{width:"100%",minHeight:"150px",padding:"0.75rem",borderRadius:"4px",border:"1px solid var(--border-color)",marginBottom:"1rem",resize:"vertical"}}),(0,s.jsxs)("div",{style:{display:"flex",gap:"0.5rem",justifyContent:"flex-end"},children:[(0,s.jsx)("button",{onClick:()=>w(!1),style:{padding:"0.5rem 1rem",background:"var(--bg-secondary)",color:"var(--text-primary)",borderRadius:"4px",border:"1px solid var(--border-color)",cursor:"pointer"},children:"Cancel"}),(0,s.jsx)("button",{onClick:async()=>{if(!D||R.trim().length<10)y("Please provide a detailed reason (minimum 10 characters)");else{v(D);try{(await o.A.post("/api/buyer/dispute/".concat(D),{reason:R},{headers:r()})).data.success&&(j("Dispute raised successfully"),w(!1),B())}catch(t){var e,i;y((null===(e=t.response)||void 0===e||null===(i=e.data)||void 0===i?void 0:i.error)||"Failed to raise dispute")}finally{v(null)}}},disabled:R.trim().length<10,style:{padding:"0.5rem 1rem",background:"#dc3545",color:"white",borderRadius:"4px",border:"none",cursor:R.trim().length<10?"not-allowed":"pointer",opacity:R.trim().length<10?.5:1},children:"Submit Dispute"})]})]})})]}):(0,s.jsxs)("div",{style:{padding:"2rem",textAlign:"center"},children:[(0,s.jsx)("h2",{children:"Buyer Dashboard"}),(0,s.jsx)("p",{children:"Please log in to view your purchases."}),(0,s.jsx)(d.N_,{to:"/login",style:{display:"inline-block",padding:"0.75rem 1.5rem",background:"var(--accent-primary)",color:"white",borderRadius:"4px",textDecoration:"none"},children:"Log In"})]})}}}]); //# sourceMappingURL=888.0fe79881.chunk.js.mapapplication/javascriptbinary
    https://whatsonchain.com/tx/91d4d5d43bd2e8e7a89144fa36f87edaf5aa2b34acd2a285087f5cea84573e7f