Skip to content

Commit 3cb7dd2

Browse files
committed
deploy: 76a2058
1 parent 81a5123 commit 3cb7dd2

File tree

48 files changed

+10818
-280
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+10818
-280
lines changed

asset-manifest.json

-50
This file was deleted.

assets/index-B8poDV1B.js

+10,693
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/index-BixdQiYX.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/index-CeR_XiBw.js

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import{p as m,s as C,a as b,r as y,O as w,i as x,c as f,b as p,S as _,x as h,d as v,E as c,e as E,A as I,C as $,M as O,R}from"./index-B8poDV1B.js";const s=m({status:"uninitialized"}),u={state:s,subscribeKey(t,e){return C(s,t,e)},subscribe(t){return b(s,()=>t(s))},_getClient(){if(!s._client)throw new Error("SIWEController client not set");return s._client},async getNonce(t){const n=await this._getClient().getNonce(t);return this.setNonce(n),n},async getSession(){const e=await this._getClient().getSession();return e&&(this.setSession(e),this.setStatus("success")),e},createMessage(t){const n=this._getClient().createMessage(t);return this.setMessage(n),n},async verifyMessage(t){return await this._getClient().verifyMessage(t)},async signIn(){return await this._getClient().signIn()},async signOut(){var e;const t=this._getClient();await t.signOut(),this.setStatus("ready"),(e=t.onSignOut)==null||e.call(t)},onSignIn(t){var n;const e=this._getClient();(n=e.onSignIn)==null||n.call(e,t)},onSignOut(){var e;const t=this._getClient();(e=t.onSignOut)==null||e.call(t)},setSIWEClient(t){s._client=y(t),s.status="ready",w.setIsSiweEnabled(t.options.enabled)},setNonce(t){s.nonce=t},setStatus(t){s.status=t},setMessage(t){s.message=t},setSession(t){s.session=t}},W=x`
2+
:host {
3+
display: flex;
4+
justify-content: center;
5+
gap: var(--wui-spacing-2xl);
6+
}
7+
8+
wui-visual-thumbnail:nth-child(1) {
9+
z-index: 1;
10+
}
11+
`;var j=function(t,e,n,a){var o=arguments.length,i=o<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,n):a,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,a);else for(var l=t.length-1;l>=0;l--)(r=t[l])&&(i=(o<3?r(i):o>3?r(e,n,i):r(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i};let g=class extends p{constructor(){var e;super(...arguments),this.dappImageUrl=(e=w.state.metadata)==null?void 0:e.icons,this.walletImageUrl=_.getConnectedWalletImageUrl()}firstUpdated(){var n;const e=(n=this.shadowRoot)==null?void 0:n.querySelectorAll("wui-visual-thumbnail");e!=null&&e[0]&&this.createAnimation(e[0],"translate(18px)"),e!=null&&e[1]&&this.createAnimation(e[1],"translate(-18px)")}render(){var e;return h`
12+
<wui-visual-thumbnail
13+
?borderRadiusFull=${!0}
14+
.imageSrc=${(e=this.dappImageUrl)==null?void 0:e[0]}
15+
></wui-visual-thumbnail>
16+
<wui-visual-thumbnail .imageSrc=${this.walletImageUrl}></wui-visual-thumbnail>
17+
`}createAnimation(e,n){e.animate([{transform:"translateX(0px)"},{transform:n}],{duration:1600,easing:"cubic-bezier(0.56, 0, 0.48, 1)",direction:"alternate",iterations:1/0})}};g.styles=W;g=j([f("w3m-connecting-siwe")],g);var S=function(t,e,n,a){var o=arguments.length,i=o<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,n):a,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,a);else for(var l=t.length-1;l>=0;l--)(r=t[l])&&(i=(o<3?r(i):o>3?r(e,n,i):r(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i};let d=class extends p{constructor(){var e;super(...arguments),this.dappName=(e=w.state.metadata)==null?void 0:e.name,this.isSigning=!1}render(){return h`
18+
<wui-flex justifyContent="center" .padding=${["2xl","0","xxl","0"]}>
19+
<w3m-connecting-siwe></w3m-connecting-siwe>
20+
</wui-flex>
21+
<wui-flex
22+
.padding=${["0","4xl","l","4xl"]}
23+
gap="s"
24+
justifyContent="space-between"
25+
>
26+
<wui-text variant="paragraph-500" align="center" color="fg-100"
27+
>${this.dappName??"Dapp"} needs to connect to your wallet</wui-text
28+
>
29+
</wui-flex>
30+
<wui-flex
31+
.padding=${["0","3xl","l","3xl"]}
32+
gap="s"
33+
justifyContent="space-between"
34+
>
35+
<wui-text variant="small-400" align="center" color="fg-200"
36+
>Sign this message to prove you own this wallet and proceed. Canceling will disconnect
37+
you.</wui-text
38+
>
39+
</wui-flex>
40+
<wui-flex .padding=${["l","xl","xl","xl"]} gap="s" justifyContent="space-between">
41+
<wui-button
42+
size="md"
43+
?fullwidth=${!0}
44+
variant="shade"
45+
@click=${this.onCancel.bind(this)}
46+
data-testid="w3m-connecting-siwe-cancel"
47+
>
48+
Cancel
49+
</wui-button>
50+
<wui-button
51+
size="md"
52+
?fullwidth=${!0}
53+
variant="fill"
54+
@click=${this.onSign.bind(this)}
55+
?loading=${this.isSigning}
56+
data-testid="w3m-connecting-siwe-sign"
57+
>
58+
${this.isSigning?"Signing...":"Sign"}
59+
</wui-button>
60+
</wui-flex>
61+
`}async onSign(){this.isSigning=!0,c.sendEvent({event:"CLICK_SIGN_SIWE_MESSAGE",type:"track"});try{u.setStatus("loading");const e=await u.signIn();return u.setStatus("success"),c.sendEvent({event:"SIWE_AUTH_SUCCESS",type:"track"}),e}catch{return E.showError("Signature declined"),u.setStatus("error"),c.sendEvent({event:"SIWE_AUTH_ERROR",type:"track"})}finally{this.isSigning=!1}}async onCancel(){const{isConnected:e}=I.state;e?(await $.disconnect(),O.close()):R.push("Connect"),c.sendEvent({event:"CLICK_CANCEL_SIWE",type:"track"})}};S([v()],d.prototype,"isSigning",void 0);d=S([f("w3m-connecting-siwe-view")],d);export{u as SIWEController,g as W3mConnectingSiwe,d as W3mConnectingSiweView};

index.html

+63-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,63 @@
1-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><script src="/datafeeds/udf/dist/bundle.js"></script><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0" name="viewport"/><meta content="#000000" name="theme-color"/><meta content="A Decentralized Order Book on Fuel.Network" name="description"/><link href="/site.webmanifest" rel="manifest"/><link href="/favicon.ico" rel="icon"/><link href="/favicon-32x32.png" rel="icon" sizes="32x32" type="image/png"><link href="/favicon-16x16.png" rel="icon" sizes="16x16" type="image/png"><link href="/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180"><title>Spark</title><meta content="Cross-margin oracle-based perpetual order book on Fuel" name="description"><meta content="https://app.sprk.fi" property="og:url"><meta content="website" property="og:type"><meta content="Spark" property="og:title"><meta content="Cross-margin oracle-based perpetual order book on Fuel" property="og:description"><meta content="https://opengraph.b-cdn.net/production/documents/68187cdc-9a1a-4117-9f2c-d31b8b341b5d.png?token=LRhaXV-Rrz-IJOtW2ynpuFWnfdrp4tiWAlcdO2H4kbI&height=655&width=1200&expires=33245123728" property="og:image"><meta content="summary_large_image" name="twitter:card"><meta content="app.sprk.fi" property="twitter:domain"><meta content="https://app.sprk.fi" property="twitter:url"><meta content="Spark" name="twitter:title"><meta content="Cross-margin oracle-based perpetual order book on Fuel" name="twitter:description"><meta content="https://opengraph.b-cdn.net/production/documents/68187cdc-9a1a-4117-9f2c-d31b8b341b5d.png?token=LRhaXV-Rrz-IJOtW2ynpuFWnfdrp4tiWAlcdO2H4kbI&height=655&width=1200&expires=33245123728" name="twitter:image"><script defer="defer" src="/static/js/main.19345e2e.js"></script><link href="/static/css/main.f3328c52.css" rel="stylesheet"></head><script async src="https://www.googletagmanager.com/gtag/js?id=G-27LTSEDRM1"></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-27LTSEDRM1")</script><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div id="portal-root"></div></body></html>
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<!-- HTML Meta Tags -->
5+
<title>Spark</title>
6+
<meta charset="utf-8" />
7+
<script src="/datafeeds/udf/dist/bundle.js"></script>
8+
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" name="viewport" />
9+
<meta content="#000000" name="theme-color" />
10+
<meta content="A Decentralized Order Book on Fuel.Network" name="description" />
11+
12+
<!--
13+
manifest.json provides metadata used when your web app is installed on a
14+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
15+
-->
16+
<link href="/site.webmanifest" rel="manifest" />
17+
<link href="/favicon.ico" rel="icon" />
18+
<link href="/favicon-32x32.png" rel="icon" sizes="32x32" type="image/png" />
19+
<link href="/favicon-16x16.png" rel="icon" sizes="16x16" type="image/png" />
20+
<link href="/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180" />
21+
22+
<!-- Facebook Meta Tags -->
23+
<meta content="https://app.sprk.fi" property="og:url" />
24+
<meta content="website" property="og:type" />
25+
<meta content="Spark" property="og:title" />
26+
<meta content="Cross-margin oracle-based perpetual order book on Fuel" property="og:description" />
27+
<meta
28+
content="https://opengraph.b-cdn.net/production/documents/68187cdc-9a1a-4117-9f2c-d31b8b341b5d.png?token=LRhaXV-Rrz-IJOtW2ynpuFWnfdrp4tiWAlcdO2H4kbI&height=655&width=1200&expires=33245123728"
29+
property="og:image"
30+
/>
31+
32+
<!-- Twitter Meta Tags -->
33+
<meta content="summary_large_image" name="twitter:card" />
34+
<meta content="app.sprk.fi" property="twitter:domain" />
35+
<meta content="https://app.sprk.fi" property="twitter:url" />
36+
<meta content="Spark" name="twitter:title" />
37+
<meta content="Cross-margin oracle-based perpetual order book on Fuel" name="twitter:description" />
38+
<meta
39+
content="https://opengraph.b-cdn.net/production/documents/68187cdc-9a1a-4117-9f2c-d31b8b341b5d.png?token=LRhaXV-Rrz-IJOtW2ynpuFWnfdrp4tiWAlcdO2H4kbI&height=655&width=1200&expires=33245123728"
40+
name="twitter:image"
41+
/>
42+
<script type="module" crossorigin src="/assets/index-B8poDV1B.js"></script>
43+
<link rel="stylesheet" crossorigin href="/assets/index-BixdQiYX.css">
44+
</head>
45+
<body>
46+
<noscript>You need to enable JavaScript to run this app.</noscript>
47+
<div id="root"></div>
48+
<div id="portal-root"></div>
49+
50+
51+
<!-- Google tag (gtag.js) -->
52+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-27LTSEDRM1"></script>
53+
<script>
54+
window.dataLayer = window.dataLayer || [];
55+
function gtag() {
56+
dataLayer.push(arguments);
57+
}
58+
gtag("js", new Date());
59+
60+
gtag("config", "G-27LTSEDRM1");
61+
</script>
62+
</body>
63+
</html>

static/css/main.f3328c52.css

-4
This file was deleted.

static/css/main.f3328c52.css.map

-1
This file was deleted.

static/js/378.e8fd4c5e.chunk.js

-3
This file was deleted.

static/js/378.e8fd4c5e.chunk.js.LICENSE.txt

-11
This file was deleted.

static/js/378.e8fd4c5e.chunk.js.map

-1
This file was deleted.

static/js/507.bea7a314.chunk.js

-2
This file was deleted.

0 commit comments

Comments
 (0)