PageSourceSearch

https://app.dfx.swiss/static/js/9748.caf9f7f4.chunk.js

js dfx.swiss collected 2026-10-01 13:55:35 UTC 12,573 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_dfx_swiss_services_react=self.webpackChunk_dfx_swiss_services_react||[]).push([[9748],{50014:(e,s,t)=>{t.d(s,{m:()=>y});var n=t(89379),r=t(21437),a=t(7290),l=t(65043),o=t(40392),i=t(98648),c=t(60346),d=t(8738),u=t(41137),h=t(4237),x=t(70579);function m(e){let{type:s,onConfirm:t}=e;switch(s){case i.S4.META_MASK:return(0,x.jsx)(f,{onConfirm:t});case i.S4.ALBY:return(0,x.jsx)(p,{onConfirm:t});case i.S4.LEDGER_BTC:case i.S4.LEDGER_ETH:case i.S4.BITBOX_BTC:case i.S4.BITBOX_ETH:return(0,x.jsx)(b,{onConfirm:t});case i.S4.TREZOR_BTC:case i.S4.TREZOR_ETH:return(0,x.jsx)(g,{onConfirm:t});case i.S4.PHANTOM_SOL:return(0,x.jsx)(w,{onConfirm:t});case i.S4.TRUST_SOL:case i.S4.TRUST_TRX:return(0,x.jsx)(v,{onConfirm:t});case i.S4.TRONLINK_TRX:return(0,x.jsx)(C,{onConfirm:t});case i.S4.CLI_BTC:case i.S4.CLI_LN:case i.S4.CLI_FIRO:case i.S4.CLI_XMR:case i.S4.CLI_ZANO:case i.S4.CLI_ICP:case i.S4.CLI_ETH:case i.S4.CLI_ADA:case i.S4.CLI_AR:case i.S4.CLI_SOL:case i.S4.CLI_TRX:case i.S4.CLI_SPARK:case i.S4.CLI_ARK:case i.S4.DFX_TARO:case i.S4.WALLET_CONNECT:case i.S4.CAKE:case i.S4.MONERO:case i.S4.MAIL:case i.S4.ADDRESS:return(0,x.jsx)(x.Fragment,{})}}function f(e){let{onConfirm:s}=e;const{translate:t}=(0,h.M)();return(0,x.jsxs)(a.QB,{gap:4,children:[(0,x.jsx)("h1",{className:"text-dfxGray-700",children:t("screens/home","Please install MetaMask or Rabby!")}),(0,x.jsxs)("p",{className:"text-dfxGray-700",children:[t("screens/home","You need to install the MetaMask or Rabby browser extension to be able to use this service.")," ",(0,x.jsxs)(u.x6,{i18nKey:"screens/home.visit",children:["Visit ",(0,x.jsx)(j,{})," for more details."]})]}),(0,x.jsx)("div",{className:"mx-auto",children:(0,x.jsx)(a.OV,{width:a.Kl.SM,onClick:s,label:t("general/actions","OK")})})]})}function j(){return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(a.ah,{label:"metamask.io",url:"https://metamask.io",dark:!0})," /"," ",(0,x.jsx)(a.ah,{label:"rabby.io",url:"https://rabby.io/",dark:!0})]})}function p(e){let{onConfirm:s}=e;const{translate:t}=(0,h.M)();return(0,x.jsxs)(a.QB,{gap:4,children:[(0,x.jsx)("h1",{className:"text-dfxGray-700",children:t("screens/home","Please install Alby!")}),(0,x.jsxs)("p",{className:"text-dfxGray-700",children:[t("screens/home","You need to install the Alby browser extension to be able to use this service.")," ",(0,x.jsxs)(u.x6,{i18nKey:"screens/home.visit",children:["Visit ",(0,x.jsx)(a.ah,{label:"getalby.com",url:"https://getalby.com/",dark:!0})," for more details."]})]}),(0,x.jsx)("div",{className:"mx-auto",children:(0,x.jsx)(a.OV,{width:a.Kl.SM,onClick:s,label:t("general/actions","OK")})})]})}function b(e){let{onConfirm:s}=e;const{translate:t}=(0,h.M)();return(0,x.jsxs)(a.QB,{gap:4,children:[(0,x.jsx)("h1",{className:"text-dfxGray-700",children:t("screens/home",d.Fr?"Mobile not supported!":"Browser not supported!")}),(0,x.jsxs)("p",{className:"text-dfxGray-700",children:[t("screens/home","Please use a desktop device with a compatible browser (e.g. Chrome) to be able to use this service.")," ",(0,x.jsxs)(u.x6,{i18nKey:"screens/home.visit",children:["Visit ",(0,x.jsx)(a.ah,{label:"caniuse.com",url:"https://caniuse.com/webhid",dark:!0})," for more details."]})]}),(0,x.jsx)("div",{className:"mx-auto",children:(0,x.jsx)(a.OV,{width:a.Kl.SM,onClick:s,label:t("general/actions","OK")})})]})}function g(e){let{onConfirm:s}=e;const{translate:t}=(0,h.M)();return(0,x.jsxs)(a.QB,{gap:4,children:[(0,x.jsx)("h1",{className:"text-dfxGray-700",children:t("screens/home","Trezor Bridge not installed!")}),(0,x.jsxs)("p",{className:"text-dfxGray-700",children:[t("screens/home","Please install the Trezor Bridge to be able to use this service.")," ",(0,x.jsxs)(u.x6,{i18nKey:"screens/home.visit",children:["Visit ",(0,x.jsx)(a.ah,{label:"trezor.io",url:"https://trezor.io/learn/a/what-is-trezor-bridge",dark:!0})," for more details."]})]}),(0,x.jsx)("div",{className:"mx-auto",children:(0,x.jsx)(a.OV,{width:a.Kl.SM,onClick:s,label:t("general/actions","OK")})})]})}function w(e){let{onConfirm:s}=e;const{translate:t}=(0,h.M)();return(0,x.jsxs)(a.QB,{gap:4,children:[(0,x.jsx)("h1",{className:"text-dfxGray-700",children:t("screens/home","Please install Phantom!")}),(0,x.jsxs)("p",{className:"text-dfxGray-700",children:[t("screens/home","You need to install the Phantom browser extension to be able to use this service.")," ",(0,x.jsxs)(u.x6,{i18nKey:"screens/home.visit",children:["Visit ",(0,x.jsx)(a.ah,{label:"phantom.app",url:"https://phantom.app/",dark:!0})," for more details."]})," "]}),(0,x.jsx)("div",{className:"mx-auto",children:(0,x.jsx)(a.OV,{width:a.Kl.SM,onClick:s,label:t("general/actions","OK")})})]})}function v(e){let{onConfirm:s}=e;const{translate:t}=(0,h.M)();return(0,x.jsxs)(a.QB,{gap:4,children:[(0,x.jsx)("h1",{className:"text-dfxGray-700",children:t("screens/home","Please install Trust!")}),(0,x.jsxs)("p",{className:"text-dfxGray-700",children:[t("screens/home","You need to install the Trust browser extension to be able to use this service.")," ",(0,x.jsxs)(u.x6,{i18nKey:"screens/home.visit",children:["Visit ",(0,x.jsx)(a.ah,{label:"trustwallet.com",url:"https://trustwallet.com",dark:!0})," for more details."]})," "]}),(0,x.jsx)("div",{className:"mx-auto",children:(0,x.jsx)(a.OV,{width:a.Kl.SM,onClick:s,label:t("general/actions","OK")})})]})}function C(e){let{onConfirm:s}=e;const{translate:t}=(0,h.M)();return(0,x.jsxs)(a.QB,{gap:4,children:[(0,x.jsx)("h1",{className:"text-dfxGray-700",children:t("screens/home","Please install TronLink!")}),(0,x.jsxs)("p",{className:"text-dfxGray-700",children:[t("screens/home","You need to install the TronLink browser extension to be able to use this service.")," ",(0,x.jsxs)(u.x6,{i18nKey:"screens/home.visit",children:["Visit ",(0,x.jsx)(a.ah,{label:"tronlink.org",url:"https://www.tronlink.org",dark:!0})," for more details."]})," "]}),(0,x.jsx)("div",{className:"mx-auto",children:(0,x.jsx)(a.OV,{width:a.Kl.SM,onClick:s,label:t("general/actions","OK")})})]})}function S(){const{translate:e}=(0,h.M)();return(0,x.jsxs)(a.QB,{gap:5,center:!0,children:[(0,x.jsxs)(a.QB,{center:!0,children:[(0,x.jsx)(a.g$,{icon:a.E7.SIGNATURE_POPUP}),(0,x.jsx)("h2",{className:"text-dfxGray-700",children:e("screens/home","Log in to your DFX account by verifying with your signature that you are the sole owner of the provided blockchain address.")})]}),(0,x.jsx)(a.pF,{size:a.HU.LG})]})}function y(e){let{rootRef:s,wallet:t,blockchain:d,isConnect:u,isSupported:h,fallback:f,getAccount:j,signMessage:p,renderContent:b,onLogin:g,onCancel:w,onSwitch:v,autoConnect:C}=e;const{login:y,setSession:N,switchBlockchain:k,activeWallet:T}=(0,i.u2)(),{logout:L}=(0,r.Lg)(),{session:_}=(0,r.Z2)(),[M,O]=(0,l.useState)(!0),[R,A]=(0,l.useState)(!1),[B,E]=(0,l.useState)(!1),[K,G]=(0,l.useState)(!1),[I,P]=(0,l.useState)(),V=(0,l.useRef)(!0);async function F(e){var s;G(!0),P(void 0);let r=null!==e&&void 0!==e?e:d;if(r&&(0,i.nQ)(t,r)||(r=null===(s=i.HA[t])||void 0===s?void 0:s[0]),!r)throw new Error("No blockchain");await j(t,r,T===t).then((e=>
1V.current?async function(e){var s;if(T===t&&"address"in e&&e.address.toLowerCase()===(null===_||void 0===_||null===(s=_.address)||void 0===s?void 0:s.toLowerCase())&&!u)return k(e.blockchain);u||await L();if("session"in e)return N(e.session,t,e.blockchain);return y(t,e.address,e.blockchain,((s,t)=>e.signature?Promise.resolve(e.signature):async function(e,s,t,n,r,a){V.current&&E(!0);return p(t,e,s,n,r,a).finally((()=>{V.current&&E(!1)}))}(s,e.blockchain,t,e.accountIndex,e.index,e.type)),e.key)}((0,n.A)((0,n.A)({},e),{},{blockchain:r})):void 0)).then((()=>{V.current&&g()})).catch((e=>{if(V.current)if(G(!1),e instanceof c.l)w();else{if(e instanceof o.U)return v(e.wallet),j(e.wallet,r,T===e.wallet);P(e.message)}}))}(0,l.useEffect)((()=>(V.current=!0,async function(){let e=!1;try{e=await h()}catch(s){e=!1}if(!V.current)return;!e&&f&&v(f);A(!e),O(!1),C&&e&&F()}(),()=>{V.current=!1})),[]);const Q=M?(0,x.jsx)(a.pF,{size:a.HU.LG}):R?(0,x.jsx)(m,{type:t,onConfirm:w}):B?(0,x.jsx)(S,{}):void 0;return(0,x.jsxs)(x.Fragment,{children:[Q,(0,x.jsx)("span",{className:"w-full flex flex-col items-center"+(Q?" hidden":""),children:b({rootRef:s,back:w,connect:F,isConnecting:K,error:I,onSwitch:v})})]})}},64761:(e,s,t)=>{t.d(s,{M:()=>o,T:()=>l});var n=t(4237),r=t(3405),a=t(70579);function l(e){let{error:s}=e;(0,r.x)(s);const{translate:t}=(0,n.M)();return(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-dfxGray-700",children:t("screens/home","Connection failed!")}),(0,a.jsx)("p",{className:"text-dfxRed-150",children:t("screens/home",s)})]})}function o(e){let{steps:s,params:t,img:r}=e;const{translate:l}=(0,n.M)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("ol",{className:"text-dfxBlue-800 text-left font-bold list-decimal ml-6 max-w-sm",children:s.map(((e,s)=>(0,a.jsx)("li",{children:l("screens/home",e,t)},s)))}),r&&(0,a.jsx)("img",{src:r,className:"w-full max-w-sm"})]})}},99748:(e,s,t)=>{t.r(s),t.d(s,{default:()=>m});var n=t(89379),r=t(21437),a=t(7290),l=t(65043),o=t(4237),i=t(27325),c=t(70295),d=t(50014),u=t(64761),h=t(70579);const x=3e5;function m(e){const{session:s}=(0,r.Z2)(),{createLnurlAuth:t,getLnurlAuth:a}=(0,r.As)(),[o,c]=(0,l.useState)(),[u,m]=(0,i.Q)(),j=o&&"dfxtaro:lightning:".concat(o.lnurl);return(0,l.useEffect)((()=>{if(null!==o&&void 0!==o&&o.k1){const e=Date.now();let s,t=!0;const n=()=>{s=setTimeout((()=>a(o.k1).then((e=>{t&&(e.isComplete?(t=!1,null===m||void 0===m||m.resolve(e.accessToken)):n())})).catch((s=>{if(!t)return;t=!1,c(void 0);const n=s instanceof r.UJ&&404===s.statusCode&&Date.now()-e>=x;null===m||void 0===m||m.reject(new Error(n?"LNURL login expired":"Authentication failed"))}))),1e3)};return n(),()=>{t=!1,clearTimeout(s)}}}),[null===o||void 0===o?void 0:o.k1]),(0,h.jsx)(d.m,(0,n.A)({isSupported:()=>!0,getAccount:async function(e,n,r){return r&&null!==s&&void 0!==s&&s.address?{address:s.address}:(await t().then(c),u().then((e=>({session:e}))))},signMessage:async function(){throw new Error("Invalid signature call")},renderContent:e=>(0,h.jsx)(f,(0,n.A)({link:j},e)),autoConnect:!0},e))}function f(e){let{connect:s,link:t,error:n}=e;const{translate:r}=(0,o.M)();return n?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(u.T,{error:n}),(0,h.jsx)(a.OV,{className:"mt-4",label:r("general/actions","Connect"),onClick:()=>s(),width:a.Kl.MIN})]}):t?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(a.QB,{gap:4,full:!0,center:!0,children:[(0,h.jsx)("h2",{className:"text-dfxGray-700",children:r("screens/home","Login with your BTC Taro Wallet")}),(0,h.jsx)(c.J,{data:t}),(0,h.jsx)(a.OV,{label:r("screens/home","Open app"),color:a.J8.STURDY_WHITE,onClick:()=>window.open(t,"_self")})]}),(0,h.jsx)("h2",{className:"text-dfxGray-700 mt-8",children:r("screens/home","Install BTC Taro")}),(0,h.jsx)("a",{href:"https://dfx.swiss/app/btc",target:"_blank",children:(0,h.jsx)("img",{src:"https://dfx.swiss/images/app/btc-app.jpg",className:"w-full max-w-sm"})})]}):(0,h.jsx)("div",{className:"mb-4",children:(0,h.jsx)(a.pF,{size:a.HU.LG})})}},70295:(e,s,t)=>{t.d(s,{J:()=>i,e:()=>c});var n=t(7290),r=t(75270),a=t.n(r),l=t(93245),o=t(70579);function i(e){let{data:s}=e;return(0,o.jsxs)("div",{className:"relative flex justify-center w-full max-w-[20rem]",children:[(0,o.jsx)("div",{className:"absolute bg-white border p-1 rounded-sm top-1/2 left-1/2",style:{transform:"translate(-50%, -50%)"},children:(0,o.jsx)(n.i8,{onCopy:()=>a()(s)})}),(0,o.jsx)(c,{data:s})]})}function c(e){let{data:s,isLoading:t}=e;const n=function(e){const s=(new DOMParser).parseFromString(e,"image/svg+xml").getElementsByTagName("svg")[0];return void 0!==s&&"svg"===s.nodeName}(s);return(0,o.jsx)("div",{className:"p-2 h-auto w-full max-w-[15rem] border border-dfxGray-500 rounded-md flex justify-center items-center ".concat(t?"animate-pulse border-dfxGray-300":""),children:n?(0,o.jsx)("img",{className:"h-full w-full rounded-sm",src:"data:image/svg+xml;utf8,".concat(encodeURIComponent(s)),alt:"Swiss QR Bill"}):(0,o.jsx)(l.Ay,{className:"h-full w-full rounded-sm",value:s,fgColor:t?"#0000000A":"#072440"})})}},27325:(e,s,t)=>{t.d(s,{Q:()=>a});var n=t(65043),r=t(60346);function a(){const e=(0,n.useRef)(null);return(0,n.useEffect)((()=>()=>{var s;return null===(s=e.current)||void 0===s?void 0:s.reject(new r.l)}),[]),[function(){const s={},t=new Promise(((e,t)=>{s.resolve=e,s.reject=t}));return s.promise=t,e.current=s,e.current.promise},e.current]}},40392:(e,s,t)=>{t.d(s,{U:()=>n});
1class n extends Error{constructor(e,s,t){super(s,t),this.wallet=e}}}}]);
2//# sourceMappingURL=9748.caf9f7f4.chunk.js.map

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.