PageSourceSearch

https://fantastic-froyo-63d537.netlify.app/_next/static/chunks/pages/transferAssets-104f18cf64a3d5a1.js

js fantastic-froyo-63d537.netlify.app collected 2026-10-03 10:44:24 UTC 12,561 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[495],{90221:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/transferAssets",function(){return s(50473)}])},50473:function(e,n,s){"use strict";s.r(n),s.d(n,{default:function(){return R}});var r=s(85893),i=s(9008),t=s.n(i),a=s(97556),c=s.n(a),d=s(69077),o=s(410),l=s(13936),u=s(85285),p=s(71641),m=s(730),x=s(79144),f=s(4481),h=s(72213),_=s.n(h),j=s(11163);let N=e=>{let{address:n}=e,{data:s,isFetched:i}=(0,d.do)({address:x.ANGEL_ADDRESS,abi:f.n,functionName:"getUsername",args:[n]}),t=(0,j.useRouter)();return(0,r.jsxs)("button",{onClick:()=>t.push({pathname:"/transferAssets/transfer",query:{txType:1,beneficiary:n}}),className:_().beneficiaryContaier,children:[(0,r.jsx)("div",{className:_().beneficiaryBox,children:s&&(0,r.jsx)("p",{children:s.charAt(0).toUpperCase()})}),(0,r.jsx)("p",{className:_().name,children:s&&s})]})};var g=s(67294),y=s(33172),A=s.n(y);let T=e=>{let{txType:n}=e,[s,i]=(0,g.useState)(),[t,a]=(0,g.useState)(!1),{data:c,isFetched:o,refetch:l}=(0,d.do)({address:x.ANGEL_ADDRESS,abi:f.n,functionName:"getAddress",args:[s]}),{data:u,refetch:p}=(0,d.do)({address:x.ANGEL_ADDRESS,abi:f.n,functionName:"getUsername",args:[s]}),{config:m}=(0,d.PJ)({address:x.ANGEL_ADDRESS,abi:f.n,functionName:"addToBeneficiaries",args:[c]}),{write:h}=(0,d.GG)(m),_=(0,j.useRouter)();return(0,r.jsx)(r.Fragment,{children:0==n?"":(0,r.jsxs)("div",{className:A().displayRecipient,children:[(0,r.jsxs)("div",{className:A().header,children:[(0,r.jsx)("h3",{children:"New Angel Recipient"}),(0,r.jsx)("button",{disabled:!h,onClick:()=>h(),children:(0,r.jsx)("img",{src:"/icons/beneficiary.png"})})]}),(0,r.jsxs)("div",{className:A().inputSection,children:[(0,r.jsx)("p",{children:"To: "}),(0,r.jsx)("input",{onChange:e=>i(e.target.value),placeholder:1==n||2==n?"Input angel name here":"Input Address here"}),(0,r.jsx)("button",{className:A().enterButton,onClick:()=>void((3==n||4==n)&&p(),(1==n||2==n)&&l(),a(!0)),children:"Enter"})]}),(0,r.jsxs)("div",{className:A().recipientInformation,children:[(0,r.jsx)("img",{src:x.DEFAULT_PROFILE_IMAGE}),(0,r.jsxs)("div",{className:A().text,children:[(0,r.jsx)("p",{className:A().miniTitle,children:"Username"}),(0,r.jsxs)("p",{className:A().username,children:[(3==n||4==n)&&t&&u?(0,x.addAngelSuffix)(u):"",(1==n||2==n)&&s?(0,x.addAngelSuffix)(s):""]}),(0,r.jsx)("p",{className:A().miniTitle,children:"Address"}),(0,r.jsxs)("p",{className:A().address,children:[(1==n||2==n)&&t&&(c!=x.ADDRESS_ZERO?c:(0,r.jsx)("p",{style:{color:"red"},children:"No Matching Address"})),(3==n||4==n)&&t&&(0,x.isValidEthereumAddress)(s)?s:" "]})]})]}),(0,r.jsx)("button",{onClick:()=>_.push({pathname:"/transferAssets/transfer",query:{txType:n,beneficiary:1==n||2==n?c:s}}),className:A().sendButton,children:"Next"})]})})};var b=s(83718),E=s.n(b),C=s(26890),v=s(31407);let S=()=>{let[e,n]=(0,g.useState)(),{address:s}=(0,d.mA)(),{data:i}=(0,d.mx)({chainId:v.v8.id,onSuccess(e){console.log("Success",e)}}),t="eip155:80001:".concat(x.CHANNEL_ADDRESS),a="eip155:80001:".concat(s),{config:c,error:o}=(0,d.PJ)({address:x.ANGEL_ADDRESS,abi:f.n,functionName:"registerAngelAccount",args:[e,x.DEFAULT_PROFILE_IMAGE]}),{write:l,isLoading:u}=(0,d.GG)(c);async function p(){await C.channels.subscribe({signer:i&&i,channelAddress:t,userAddress:a,onSuccess:()=>{console.log("opt in success")},onError:()=>{console.error("opt in error")},env:"staging"})}return(0,r.jsxs)("div",{className:E().createAccount,children:[(0,r.jsx)("h2",{children:"Create Account"}),(0,r.jsx)("p",{children:"Attach a unique name to your address to facilitate easier transactions."}),(0,r.jsx)("p",{children:"The unique name you set will be permannet and cannot be changed once set."}),(0,r.jsxs)("p",{className:E().userName,children:[(0,r.jsx)("b",{children:"Username :"})," "]}),(0,r.jsx)("input",{onChange:e=>n(e.target.value)}),o&&o.message&&o.message.includes("Invalid Characters Used")&&(0,r.jsx)("p",{className:"errorMsg",children:"Invalid Characters Used. Avoid Using Special Characters"}),o&&o.message&&o.message.includes("Max Handle Length Exceeded")&&(0,r.jsx)("p",{className:"errorMsg",children:"Max Handle Length Exceeded"}),o&&o.message&&o.message.includes("Cant Use Default Username")&&(0,r.jsx)("p",{className:"errorMsg",children:"nousername is a defaultusername. Cant Use Default Username!"}),o&&o.message&&o.message.includes("Username Taken Or Address Already Registered")&&(0,r.jsx)("p",{className:"errorMsg",children:"Username Taken Or this Address Already Has An Account"}),(0,r.jsx)("button",{onClick:p,children:"Opt-In"}),(0,r.jsx)("button",{disabled:!l,onClick:()=>l(),children:u?"Loading...":"Sign Up"})]})};function R(){let[e,n]=(0,g.useState)(0),[s,i]=(0,g.useState)(),{address:a,isConnected:h}=(0,d.mA)(),{loading:_,data:j}=(0,p.a)(m.GET_BENEFICIARIES,{variables:{sender:a}}),{data:y,refetch:A}=(0,d.do)({address:x.ANGEL_ADDRESS,abi:f.n,functionName:"getUsername",args:[a]});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(t(),{children:[(0,r.jsx)("title",{children:"Angel Protocol"}),(0,r.jsx)("meta",{name:"description",content:"Angel Protocol Landing page"}),(0,r.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.png"})]}),(0,r.jsx)("main",{children:h?(0,r.jsxs)("div",{className:c().transferAssets,children:[(0,r.jsx)(l.j,{}),(0,r.jsxs)("div",{className:c().content,children:[(0,r.jsx)(u.D,{}),(0,r.jsx)("div",{className:"whiteContent",children:y?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:c().benef
1iciaries,children:[(0,r.jsx)("h3",{children:"Beneficiaries"}),_?"Getting beneficiaries...":(0,r.jsx)("div",{className:c().beneficiariesBox,children:j&&j.beneficiaryEntities.length>0?j.beneficiaryEntities.map(e=>{let{sender:n,beneficiary:s}=e;if(s)return(0,r.jsx)(N,{address:s})}):(0,r.jsx)("p",{children:"No Beneficiaries"})})]}),(0,r.jsxs)("div",{className:c().transferOptions,children:[(0,r.jsx)("h3",{children:" Transfer Assets"}),(0,r.jsxs)("div",{className:c().transferOptionsContainer,children:[(0,r.jsxs)("div",{className:c().left,children:[(0,r.jsxs)("div",{className:1==s?c().optionClicked:c().option,onClick:()=>{n(1),i(1)},children:[(0,r.jsx)("img",{src:"/icons/sendcryptousername.png"}),(0,r.jsxs)("div",{className:c().text,children:[(0,r.jsxs)("h4",{children:["Send ",(0,r.jsx)("span",{className:"blueText",children:"Crypto"})," to Angel ",(0,r.jsx)("span",{className:"blueText",children:"Username"})]}),(0,r.jsx)("p",{children:"Send crypto to any angel name"})]}),(0,r.jsx)("img",{src:"/icons/forward.png",className:c().forward})]}),(0,r.jsxs)("div",{className:2==s?c().optionClicked:c().option,onClick:()=>{n(2),i(2)},children:[(0,r.jsx)("img",{src:"/icons/sendnftusername.png"}),(0,r.jsxs)("div",{className:c().text,children:[(0,r.jsxs)("h4",{children:["Send ",(0,r.jsx)("span",{className:"blueText",children:"NFTs"})," to Angel ",(0,r.jsx)("span",{className:"blueText",children:"Username"})]}),(0,r.jsx)("p",{children:"Send NFTs to any angel name"})]}),(0,r.jsx)("img",{src:"/icons/forward.png",className:c().forward})]}),(0,r.jsxs)("div",{className:3==s?c().optionClicked:c().option,onClick:()=>{n(3),i(3)},children:[(0,r.jsx)("img",{src:"/icons/sendcryptoaddress.png"}),(0,r.jsxs)("div",{className:c().text,children:[(0,r.jsxs)("h4",{children:["Send ",(0,r.jsx)("span",{className:"blueText",children:"Crypto"})," to"," ",(0,r.jsx)("span",{className:"blueText",children:"Address"})]}),(0,r.jsx)("p",{children:"Send crypto to a regular address"})]}),(0,r.jsx)("img",{src:"/icons/forward.png",className:c().forward})]}),(0,r.jsxs)("div",{className:4==s?c().optionClicked:c().option,onClick:()=>{n(4),i(4)},children:[(0,r.jsx)("img",{src:"/icons/sendnftaddress.png"}),(0,r.jsxs)("div",{className:c().text,children:[(0,r.jsxs)("h4",{children:["Send ",(0,r.jsx)("span",{className:"blueText",children:"NFTs"})," To"," ",(0,r.jsx)("span",{className:"blueText",children:"Address"})]}),(0,r.jsx)("p",{children:"Send NFTs to a regular address"})]}),(0,r.jsx)("img",{src:"/icons/forward.png",className:c().forward})]})]}),(0,r.jsx)("div",{className:c().right,children:(0,r.jsx)(T,{txType:e})})]})]})]}):(0,r.jsx)(S,{})})]})]}):(0,r.jsx)(o.R,{})})]})}},730:function(e,n,s){"use strict";Object.defineProperty(n,"__esModule",{value:!0});let r=s(82729),i=s(45517);function t(){let e=r._(["\n  query GetCredits($recipient: Bytes) {\n    transactionEntities(where: { recipient: $recipient }, first: 5) {\n      id\n      sender\n      senderUserName\n      recipient\n      recipientUserName\n      asset\n      amountOrTokenId\n      narration\n      status\n      txReference\n      time\n      txType\n    }\n  }\n"]);return t=function(){return e},e}function a(){let e=r._(["\n  query GetDebits($sender: Bytes) {\n    transactionEntities(where: { sender: $sender }, first: 5) {\n      id\n      sender\n      senderUserName\n      recipient\n      recipientUserName\n      asset\n      amountOrTokenId\n      narration\n      status\n      txReference\n      time\n      txType\n    }\n  }\n"]);return a=function(){return e},e}function c(){let e=r._(["\n  query GetBeneficiaries($sender: Bytes) {\n    beneficiaryEntities(where: { sender: $sender }) {\n      id\n      sender\n      beneficiary\n    }\n  }\n"]);return c=function(){return e},e}function d(){let e=r._(["\n  query GetUsersTransactions($user: Bytes, $beneficiary: Bytes) {\n    transactionEntities(\n      where: {\n        or: [\n          { sender: $user, recipient: $beneficiary }\n          { sender: $beneficiary, recipient: $user }\n        ]\n      }\n      orderBy: time\n      orderDirection: asc\n    ) {\n      id\n      sender\n      senderUserName\n      recipient\n      recipientUserName\n      asset\n      amountOrTokenId\n      narration\n      status\n      txReference\n      time\n      txType\n    }\n  }\n"]);return d=function(){return e},e}function o(){let e=r._(["\n  query GetUsersTransactions($user: Bytes, $status: Int) {\n    transactionEntities(\n      where: { and: [{ recipient: $user }, { status: $status }] }\n      orderBy: time\n      orderDirection: desc\n    ) {\n      id\n      sender\n      senderUserName\n      recipient\n      recipientUserName\n      asset\n      amountOrTokenId\n      narration\n      status\n      txReference\n      time\n      txType\n    }\n  }\n"]);return o=function(){return e},e}function l(){let e=r._(["\n  query GetUsersTransactions($user: Bytes) {\n    transactionEntities(\n      where: { or: [{ sender: $user }, { recipient: $user }] }\n      orderBy: time\n      orderDirection: desc\n    ) {\n      id\n      sender\n      senderUserName\n      recipient\n      recipientUserName\n      asset\n      amountOrTokenId\n      narration\n      status\n      txReference\n      time\n      txType\n    }\n  }\n"]);return l=function(){return e},e}let u=(0,i.gql)(t()),p=(0,i.gql)(a()),m=(0,i.gql)(c()),x=(0,i.gql)(d()),f=(0,i.gql)(o()),h=(0,i.gql)(l());e.exports={GET_CREDITS:u,GET_DEBITS:p,GET_ALL_USERS_TX:x,GET_BENEFICIARIES:m,GET_USER_CLAIMS:f,GET_USERS_TRANSACTIONS:h}},97556:function(e){e.exports={transferAssets:"TransferAssets_transferAssets__dRnJW",beneficiaries:"TransferAssets_beneficiaries__SYO_m",content:"TransferAssets_content__i3Vt8",transferOptions:"TransferAssets_transferOptions__VGfFJ",transferOptionsContainer:"TransferAssets_transferOptionsContainer__fREF9",option:"TransferAssets_option__GxFuo",optionClicked:"TransferAssets_optionClicked__8jX_2",text:"TransferAssets_text__1Bvyr",forward:"TransferAssets_forward__LEZF0"}},72213:function(e){e.exports={beneficiaryContaier:"BeneficiaryBox_beneficiaryContaier__cqNMG",beneficiaryBox:"BeneficiaryBox_beneficiaryBox__J_sMl",name:"BeneficiaryBox_name__kDPLu"}},83718:function(e){e.exports={createAccount:"CreateAccount_createAccount__P9u2L",userName:"CreateAccount_userName__aj8cL"}}
1,33172:function(e){e.exports={displayRecipient:"DisplayRecipient_displayRecipient__mmTbK",header:"DisplayRecipient_header___5wKn",inputSection:"DisplayRecipient_inputSection__43cCs",enterButton:"DisplayRecipient_enterButton__TdAqW",recipientInformation:"DisplayRecipient_recipientInformation__npinf",text:"DisplayRecipient_text__7IVyh",miniTitle:"DisplayRecipient_miniTitle__ZQuRQ",username:"DisplayRecipient_username__tXR2R",address:"DisplayRecipient_address__3xO2p",sendButton:"DisplayRecipient_sendButton__UnoEw"}},993:function(){},42480:function(){},88924:function(){},55024:function(){}},function(e){e.O(0,[854,714,281,217,569,55,774,888,179],function(){return e(e.s=90221)}),_N_E=e.O()}]);

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.