UNPKG

@privy-io/react-auth

Version:

React client for the Privy Auth API

2 lines (1 loc) 2.11 kB
"use strict";var e=require("react/jsx-runtime"),r=require("styled-components"),i=require("./Layouts-dRL0OSpp.js"),s=require("./ModalHeader-DB7Tbjwz.js"),n=require("./ScreenHeader-CyURV6Ti.js"),l=require("./FundWalletMethodHeader-BKgYjMau.js"),t=require("./InjectedWalletIcon-UY3nMvZo.js"),d=require("./index-CRFXS9pP.js"),a=require("./Row-CxDF-VMy.js"),c=require("./Value-C-XtZyFa.js"),o=require("./Address-5znFAhQw.js"),j=require("./NetworkIcon-BZ9Mj6vV.js"),u=require("./useActiveWallet-BOX8xCn9.js");let x=/*#__PURE__*/r.styled.div.withConfig({displayName:"NetworkColumn",componentId:"sc-5bdbf842-0"})(["display:flex;flex-direction:row;align-items:center;gap:4px;"]);exports.TransferOrBridgeLoadingScreen=({walletClientType:r,displayName:h,addressToFund:m,chainId:g,chainName:w,isBridging:p,isErc20Flow:q,totalPriceInNativeCurrency:I,totalPriceInUsd:y,gasPriceInNativeCurrency:b,gasPriceInUsd:C})=>{let N=u.useExternalWalletListing(r);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.t,{}),/*#__PURE__*/e.jsx(d.NeutralSpinner,{centerIcon:/*#__PURE__*/e.jsx(t.InjectedWalletIcon,{icon:N?.image_url?.md,name:r})}),/*#__PURE__*/e.jsx(n.CenteredScreenHeader,{style:{marginTop:"8px",marginBottom:"12px"},title:`${p?"Bridging":"Confirming"} with ${h}`}),!p&&!q&&/*#__PURE__*/e.jsxs(a.Rows,{children:[/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(c.LabelSm,{children:"Total"}),/*#__PURE__*/e.jsx(c.Value,{children:y||I})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(c.LabelSm,{children:"To"}),/*#__PURE__*/e.jsx(c.Value,{children:/*#__PURE__*/e.jsx(o.Address,{address:m,showCopyIcon:!1})})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(c.LabelSm,{children:"Network"}),/*#__PURE__*/e.jsx(c.Value,{children:/*#__PURE__*/e.jsxs(x,{children:[/*#__PURE__*/e.jsx(j.NetworkIcon,{chainId:g,height:16,width:16})," ",w]})})]}),b&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(c.LabelSm,{children:"Estimated fee"}),/*#__PURE__*/e.jsx(c.Value,{children:C||b})]})]}),/*#__PURE__*/e.jsx(i.ConfigurableSpacer,{height:24}),/*#__PURE__*/e.jsx(s.BlobbyFooter,{})]})};