@dcl/governance-site 2.0.0 → 2.0.1-20995780683.commit-d6baf5e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/BlockOverrides-9837a6f9.js +5 -0
- package/assets/ConstantsUtil-298f7898.js +1 -0
- package/assets/ExchangeController-d2354ec6.js +1 -0
- package/assets/HelpersUtil-8cddb046.js +62 -0
- package/assets/MathUtil-b514a570.js +1 -0
- package/assets/NavigationUtil-a0d0ce87.js +1 -0
- package/assets/NetworkUtil-220ea128.js +1 -0
- package/assets/PhWallet-fd2006d2.js +14 -0
- package/assets/{features-b72c9430.js → ReownAuthentication-468828df.js} +4 -4
- package/assets/SwapController-7bfd6ce7.js +1 -0
- package/assets/{UserAvatar-78751cb5.js → UserAvatar-456716f1.js} +1 -1
- package/assets/ccip-ddcec720.js +1 -0
- package/assets/data-capture-3e424a2c.js +242 -0
- package/assets/email-ea617f9c.js +90 -0
- package/assets/embedded-wallet-814bf005.js +410 -0
- package/assets/features-fd521597.js +1 -0
- package/assets/fortmatic-f3cb4aa6.js +13 -0
- package/assets/if-defined-0a35f675.js +5 -0
- package/assets/index-034d22a0.js +138 -0
- package/assets/{index-a8255d1c.css → index-05771666.css} +4 -4
- package/assets/index-07a61b45.js +51 -0
- package/assets/index-1039ded0.js +132 -0
- package/assets/index-123c1362.js +224 -0
- package/assets/index-15bbaaa0.js +7 -0
- package/assets/{index-073512a1.js → index-206e3e77.js} +1 -1
- package/assets/index-27a991e4.js +53 -0
- package/assets/index-2d0efdd2.js +210 -0
- package/assets/index-32d53c87.js +189 -0
- package/assets/index-3b861a37.js +102 -0
- package/assets/index-4207595b.js +100 -0
- package/assets/index-4243d275.js +43 -0
- package/assets/index-42ce7246.js +63 -0
- package/assets/index-47e87339.js +152 -0
- package/assets/index-48bd3fca.js +277 -0
- package/assets/index-49cc5044.js +46 -0
- package/assets/index-5788a0d6.js +468 -0
- package/assets/index-5824c226.js +81 -0
- package/assets/index-5da565ce.js +78 -0
- package/assets/index-685e7949.js +425 -0
- package/assets/index-84e8ecf6.js +647 -0
- package/assets/index-965fdf98.js +3425 -0
- package/assets/index-9d970383.js +152 -0
- package/assets/index-a59b6662.js +68 -0
- package/assets/index-b457d047.js +1062 -0
- package/assets/index-b65e06cc.js +27 -0
- package/assets/{index-2ef9f1d1.js → index-d70e4ab8.js} +66 -66
- package/assets/index-d7a6ceea.js +30 -0
- package/assets/index-d9c55c27.js +77 -0
- package/assets/index-db5b7889.js +77 -0
- package/assets/index-e3222791.js +78 -0
- package/assets/index-eb060c20.js +1 -0
- package/assets/index-f3f03959.js +90 -0
- package/assets/index-fcda68c9.js +19 -0
- package/assets/index-ff4dea43.js +85 -0
- package/assets/networks-14f3c0d2.js +1 -0
- package/assets/onramp-dcdb1a34.js +422 -0
- package/assets/pay-with-exchange-a64f18a3.js +280 -0
- package/assets/receive-ca7bc867.js +131 -0
- package/assets/ref-88e1be05.js +13 -0
- package/assets/send-8739c9fb.js +554 -0
- package/assets/socials-ccc593f5.js +250 -0
- package/assets/swaps-0a90eb06.js +1050 -0
- package/assets/transactions-bb8cb277.js +16 -0
- package/assets/{tslib.es6-82b9ba96.js → tslib.es6-db2ec995.js} +2 -2
- package/assets/w3m-modal-869dafbc.js +891 -0
- package/assets/zoraTestnet-adc7b76b.js +36 -0
- package/index.html +4 -4
- package/package.json +3 -3
- package/assets/basic-ca749c4c.js +0 -1435
- package/assets/core-806d78ea.js +0 -249
- package/assets/fortmatic-12e0f2e5.js +0 -13
- package/assets/index-372705ba.js +0 -1321
- package/assets/index-4be588a0.js +0 -94
- package/assets/index-74e34dfb.js +0 -39
- package/assets/index-bbb36593.js +0 -7
- package/assets/index-c1c8440f.js +0 -47
- package/assets/w3m-modal-26eff9d9.js +0 -1209
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import{j as l,l as m,m as c}from"./index-48bd3fca.js";import{n as h,c as f}from"./index-84e8ecf6.js";const p=l`
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
background: linear-gradient(
|
|
5
|
+
90deg,
|
|
6
|
+
${({tokens:e})=>e.theme.foregroundPrimary} 0%,
|
|
7
|
+
${({tokens:e})=>e.theme.foregroundSecondary} 50%,
|
|
8
|
+
${({tokens:e})=>e.theme.foregroundPrimary} 100%
|
|
9
|
+
);
|
|
10
|
+
background-size: 200% 100%;
|
|
11
|
+
animation: shimmer 2s linear infinite;
|
|
12
|
+
border-radius: ${({borderRadius:e})=>e[1]};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host([data-rounded='true']) {
|
|
16
|
+
border-radius: ${({borderRadius:e})=>e[16]};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@keyframes shimmer {
|
|
20
|
+
0% {
|
|
21
|
+
background-position: 100% 0;
|
|
22
|
+
}
|
|
23
|
+
100% {
|
|
24
|
+
background-position: -100% 0;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
`;var s=globalThis&&globalThis.__decorate||function(e,o,i,n){var d=arguments.length,t=d<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,i):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(e,o,i,n);else for(var u=e.length-1;u>=0;u--)(a=e[u])&&(t=(d<3?a(t):d>3?a(o,i,t):a(o,i))||t);return d>3&&t&&Object.defineProperty(o,i,t),t};let r=class extends m{constructor(){super(...arguments),this.width="",this.height="",this.variant="default",this.rounded=!1}render(){return this.style.cssText=`
|
|
28
|
+
width: ${this.width};
|
|
29
|
+
height: ${this.height};
|
|
30
|
+
`,this.dataset.rounded=this.rounded?"true":"false",c`<slot></slot>`}};r.styles=[p];s([h()],r.prototype,"width",void 0);s([h()],r.prototype,"height",void 0);s([h()],r.prototype,"variant",void 0);s([h({type:Boolean})],r.prototype,"rounded",void 0);r=s([f("wui-shimmer")],r);
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import{j as u,r as b,k as p,l as h,m as v}from"./index-48bd3fca.js";import{n as r,c as f}from"./index-84e8ecf6.js";const g=u`
|
|
2
|
+
button {
|
|
3
|
+
background-color: transparent;
|
|
4
|
+
padding: ${({spacing:t})=>t[1]};
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
button:focus-visible {
|
|
8
|
+
box-shadow: 0 0 0 4px ${({tokens:t})=>t.core.foregroundAccent020};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
button[data-variant='accent']:hover:enabled,
|
|
12
|
+
button[data-variant='accent']:focus-visible {
|
|
13
|
+
background-color: ${({tokens:t})=>t.core.foregroundAccent010};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
button[data-variant='primary']:hover:enabled,
|
|
17
|
+
button[data-variant='primary']:focus-visible,
|
|
18
|
+
button[data-variant='secondary']:hover:enabled,
|
|
19
|
+
button[data-variant='secondary']:focus-visible {
|
|
20
|
+
background-color: ${({tokens:t})=>t.theme.foregroundSecondary};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
button[data-size='xs'] > wui-icon {
|
|
24
|
+
width: 8px;
|
|
25
|
+
height: 8px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
button[data-size='sm'] > wui-icon {
|
|
29
|
+
width: 12px;
|
|
30
|
+
height: 12px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
button[data-size='xs'],
|
|
34
|
+
button[data-size='sm'] {
|
|
35
|
+
border-radius: ${({borderRadius:t})=>t[1]};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
button[data-size='md'],
|
|
39
|
+
button[data-size='lg'] {
|
|
40
|
+
border-radius: ${({borderRadius:t})=>t[2]};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
button[data-size='md'] > wui-icon {
|
|
44
|
+
width: 16px;
|
|
45
|
+
height: 16px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
button[data-size='lg'] > wui-icon {
|
|
49
|
+
width: 20px;
|
|
50
|
+
height: 20px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
button:disabled {
|
|
54
|
+
background-color: transparent;
|
|
55
|
+
cursor: not-allowed;
|
|
56
|
+
opacity: 0.5;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
button:hover:not(:disabled) {
|
|
60
|
+
background-color: var(--wui-color-accent-glass-015);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
button:focus-visible:not(:disabled) {
|
|
64
|
+
background-color: var(--wui-color-accent-glass-015);
|
|
65
|
+
box-shadow:
|
|
66
|
+
inset 0 0 0 1px var(--wui-color-accent-100),
|
|
67
|
+
0 0 0 4px var(--wui-color-accent-glass-020);
|
|
68
|
+
}
|
|
69
|
+
`;var i=globalThis&&globalThis.__decorate||function(t,o,n,s){var c=arguments.length,a=c<3?o:s===null?s=Object.getOwnPropertyDescriptor(o,n):s,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,o,n,s);else for(var l=t.length-1;l>=0;l--)(d=t[l])&&(a=(c<3?d(a):c>3?d(o,n,a):d(o,n))||a);return c>3&&a&&Object.defineProperty(o,n,a),a};let e=class extends h{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.icon="copy",this.iconColor="default",this.variant="accent"}render(){const o={accent:"accent-primary",primary:"inverse",secondary:"default"};return v`
|
|
70
|
+
<button data-variant=${this.variant} ?disabled=${this.disabled} data-size=${this.size}>
|
|
71
|
+
<wui-icon
|
|
72
|
+
color=${o[this.variant]||this.iconColor}
|
|
73
|
+
size=${this.size}
|
|
74
|
+
name=${this.icon}
|
|
75
|
+
></wui-icon>
|
|
76
|
+
</button>
|
|
77
|
+
`}};e.styles=[b,p,g];i([r()],e.prototype,"size",void 0);i([r({type:Boolean})],e.prototype,"disabled",void 0);i([r()],e.prototype,"icon",void 0);i([r()],e.prototype,"iconColor",void 0);i([r()],e.prototype,"variant",void 0);e=i([f("wui-icon-link")],e);
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import{j as h,r as m,k as g,l as y,m as l}from"./index-48bd3fca.js";import{n as i,c as b}from"./index-84e8ecf6.js";import{o as c}from"./if-defined-0a35f675.js";import"./index-07a61b45.js";const f=h`
|
|
2
|
+
:host {
|
|
3
|
+
width: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
:host([data-type='primary']) > button {
|
|
7
|
+
background-color: ${({tokens:o})=>o.theme.backgroundPrimary};
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:host([data-type='secondary']) > button {
|
|
11
|
+
background-color: ${({tokens:o})=>o.theme.foregroundPrimary};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
button {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: space-between;
|
|
18
|
+
padding: ${({spacing:o})=>o[3]};
|
|
19
|
+
width: 100%;
|
|
20
|
+
border-radius: ${({borderRadius:o})=>o[4]};
|
|
21
|
+
transition:
|
|
22
|
+
background-color ${({durations:o})=>o.lg}
|
|
23
|
+
${({easings:o})=>o["ease-out-power-2"]},
|
|
24
|
+
scale ${({durations:o})=>o.lg} ${({easings:o})=>o["ease-out-power-2"]};
|
|
25
|
+
will-change: background-color, scale;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
wui-text {
|
|
29
|
+
text-transform: capitalize;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
wui-image {
|
|
33
|
+
color: ${({tokens:o})=>o.theme.textPrimary};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@media (hover: hover) {
|
|
37
|
+
:host([data-type='primary']) > button:hover:enabled {
|
|
38
|
+
background-color: ${({tokens:o})=>o.theme.foregroundPrimary};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:host([data-type='secondary']) > button:hover:enabled {
|
|
42
|
+
background-color: ${({tokens:o})=>o.theme.foregroundSecondary};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
button:disabled {
|
|
47
|
+
opacity: 0.5;
|
|
48
|
+
cursor: not-allowed;
|
|
49
|
+
}
|
|
50
|
+
`;var t=globalThis&&globalThis.__decorate||function(o,a,n,s){var d=arguments.length,r=d<3?a:s===null?s=Object.getOwnPropertyDescriptor(a,n):s,u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(o,a,n,s);else for(var p=o.length-1;p>=0;p--)(u=o[p])&&(r=(d<3?u(r):d>3?u(a,n,r):u(a,n))||r);return d>3&&r&&Object.defineProperty(a,n,r),r};let e=class extends y{constructor(){super(...arguments),this.type="primary",this.imageSrc="google",this.imageSize=void 0,this.loading=!1,this.boxColor="foregroundPrimary",this.disabled=!1,this.rightIcon=!0,this.boxed=!0,this.rounded=!1,this.fullSize=!1}render(){return this.dataset.rounded=this.rounded?"true":"false",this.dataset.type=this.type,l`
|
|
51
|
+
<button
|
|
52
|
+
?disabled=${this.loading?!0:!!this.disabled}
|
|
53
|
+
data-loading=${this.loading}
|
|
54
|
+
tabindex=${c(this.tabIdx)}
|
|
55
|
+
>
|
|
56
|
+
<wui-flex gap="2" alignItems="center">
|
|
57
|
+
${this.templateLeftIcon()}
|
|
58
|
+
<wui-flex gap="1">
|
|
59
|
+
<slot></slot>
|
|
60
|
+
</wui-flex>
|
|
61
|
+
</wui-flex>
|
|
62
|
+
${this.templateRightIcon()}
|
|
63
|
+
</button>
|
|
64
|
+
`}templateLeftIcon(){return this.icon?l`<wui-image
|
|
65
|
+
icon=${this.icon}
|
|
66
|
+
iconColor=${c(this.iconColor)}
|
|
67
|
+
?boxed=${this.boxed}
|
|
68
|
+
?rounded=${this.rounded}
|
|
69
|
+
boxColor=${this.boxColor}
|
|
70
|
+
></wui-image>`:l`<wui-image
|
|
71
|
+
?boxed=${this.boxed}
|
|
72
|
+
?rounded=${this.rounded}
|
|
73
|
+
?fullSize=${this.fullSize}
|
|
74
|
+
size=${c(this.imageSize)}
|
|
75
|
+
src=${this.imageSrc}
|
|
76
|
+
boxColor=${this.boxColor}
|
|
77
|
+
></wui-image>`}templateRightIcon(){return this.rightIcon?this.loading?l`<wui-loading-spinner size="md" color="accent-primary"></wui-loading-spinner>`:l`<wui-icon name="chevronRight" size="lg" color="default"></wui-icon>`:null}};e.styles=[m,g,f];t([i()],e.prototype,"type",void 0);t([i()],e.prototype,"imageSrc",void 0);t([i()],e.prototype,"imageSize",void 0);t([i()],e.prototype,"icon",void 0);t([i()],e.prototype,"iconColor",void 0);t([i({type:Boolean})],e.prototype,"loading",void 0);t([i()],e.prototype,"tabIdx",void 0);t([i()],e.prototype,"boxColor",void 0);t([i({type:Boolean})],e.prototype,"disabled",void 0);t([i({type:Boolean})],e.prototype,"rightIcon",void 0);t([i({type:Boolean})],e.prototype,"boxed",void 0);t([i({type:Boolean})],e.prototype,"rounded",void 0);t([i({type:Boolean})],e.prototype,"fullSize",void 0);e=t([b("wui-list-item")],e);
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import{j as p,r as f,k as h,l as b,m,N as d}from"./index-48bd3fca.js";import{n as i,c as g}from"./index-84e8ecf6.js";import"./index-42ce7246.js";const w=p`
|
|
2
|
+
:host {
|
|
3
|
+
width: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
button {
|
|
7
|
+
padding: ${({spacing:e})=>e[3]};
|
|
8
|
+
display: flex;
|
|
9
|
+
gap: ${({spacing:e})=>e[3]};
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
width: 100%;
|
|
12
|
+
border-radius: ${({borderRadius:e})=>e[4]};
|
|
13
|
+
background-color: transparent;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@media (hover: hover) {
|
|
17
|
+
button:hover:enabled {
|
|
18
|
+
background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
button:focus-visible:enabled {
|
|
23
|
+
background-color: ${({tokens:e})=>e.theme.foregroundSecondary};
|
|
24
|
+
box-shadow: 0 0 0 4px ${({tokens:e})=>e.core.foregroundAccent040};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
button[data-clickable='false'] {
|
|
28
|
+
pointer-events: none;
|
|
29
|
+
background-color: transparent;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
wui-image,
|
|
33
|
+
wui-icon {
|
|
34
|
+
width: ${({spacing:e})=>e[10]};
|
|
35
|
+
height: ${({spacing:e})=>e[10]};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
wui-image {
|
|
39
|
+
border-radius: ${({borderRadius:e})=>e[16]};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.token-name-container {
|
|
43
|
+
flex: 1;
|
|
44
|
+
}
|
|
45
|
+
`;var n=globalThis&&globalThis.__decorate||function(e,r,a,l){var u=arguments.length,o=u<3?r:l===null?l=Object.getOwnPropertyDescriptor(r,a):l,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,r,a,l);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(o=(u<3?s(o):u>3?s(r,a,o):s(r,a))||o);return u>3&&o&&Object.defineProperty(r,a,o),o};let t=class extends b{constructor(){super(...arguments),this.tokenName="",this.tokenImageUrl="",this.tokenValue=0,this.tokenAmount="0.0",this.tokenCurrency="",this.clickable=!1}render(){return m`
|
|
46
|
+
<button data-clickable=${String(this.clickable)}>
|
|
47
|
+
<wui-flex gap="2" alignItems="center">
|
|
48
|
+
${this.visualTemplate()}
|
|
49
|
+
<wui-flex
|
|
50
|
+
flexDirection="column"
|
|
51
|
+
justifyContent="space-between"
|
|
52
|
+
gap="1"
|
|
53
|
+
class="token-name-container"
|
|
54
|
+
>
|
|
55
|
+
<wui-text variant="md-regular" color="primary" lineClamp="1">
|
|
56
|
+
${this.tokenName}
|
|
57
|
+
</wui-text>
|
|
58
|
+
<wui-text variant="sm-regular-mono" color="secondary">
|
|
59
|
+
${d.formatNumberToLocalString(this.tokenAmount,4)} ${this.tokenCurrency}
|
|
60
|
+
</wui-text>
|
|
61
|
+
</wui-flex>
|
|
62
|
+
</wui-flex>
|
|
63
|
+
<wui-flex
|
|
64
|
+
flexDirection="column"
|
|
65
|
+
justifyContent="space-between"
|
|
66
|
+
gap="1"
|
|
67
|
+
alignItems="flex-end"
|
|
68
|
+
width="auto"
|
|
69
|
+
>
|
|
70
|
+
<wui-text variant="md-regular-mono" color="primary"
|
|
71
|
+
>$${this.tokenValue.toFixed(2)}</wui-text
|
|
72
|
+
>
|
|
73
|
+
<wui-text variant="sm-regular-mono" color="secondary">
|
|
74
|
+
${d.formatNumberToLocalString(this.tokenAmount,4)}
|
|
75
|
+
</wui-text>
|
|
76
|
+
</wui-flex>
|
|
77
|
+
</button>
|
|
78
|
+
`}visualTemplate(){return this.tokenName&&this.tokenImageUrl?m`<wui-image alt=${this.tokenName} src=${this.tokenImageUrl}></wui-image>`:m`<wui-icon name="coinPlaceholder" color="default"></wui-icon>`}};t.styles=[f,h,w];n([i()],t.prototype,"tokenName",void 0);n([i()],t.prototype,"tokenImageUrl",void 0);n([i({type:Number})],t.prototype,"tokenValue",void 0);n([i()],t.prototype,"tokenAmount",void 0);n([i()],t.prototype,"tokenCurrency",void 0);n([i({type:Boolean})],t.prototype,"clickable",void 0);t=n([g("wui-list-token")],t);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{P as t,A as c,a as d}from"./index-b457d047.js";import{b as ne,c as me,W as ce}from"./index-b457d047.js";import"./index-48bd3fca.js";import"./index-d70e4ab8.js";import"./NetworkUtil-220ea128.js";import"./BlockOverrides-9837a6f9.js";import"./index-4243d275.js";import"./index-84e8ecf6.js";import"./if-defined-0a35f675.js";import"./index-47e87339.js";import"./index-07a61b45.js";import"./index-d9c55c27.js";import"./index-42ce7246.js";import"./index-db5b7889.js";import"./index-123c1362.js";import"./index-ff4dea43.js";import"./index-b65e06cc.js";import"./index-d7a6ceea.js";import"./MathUtil-b514a570.js";const C=3e5;async function U(e){return t.handleOpenPay(e)}async function M(e,r=C){if(r<=0)throw new c(d.INVALID_PAYMENT_CONFIG,"Timeout must be greater than 0");try{await U(e)}catch(s){throw s instanceof c?s:new c(d.UNABLE_TO_INITIATE_PAYMENT,s.message)}return new Promise((s,p)=>{let o=!1;const i=setTimeout(()=>{o||(o=!0,m(),p(new c(d.GENERIC_PAYMENT_ERROR,"Payment timeout")))},r);function n(){if(o)return;const a=t.state.currentPayment,u=t.state.error,D=t.state.isPaymentInProgress;if((a==null?void 0:a.status)==="SUCCESS"){o=!0,m(),clearTimeout(i),s({success:!0,result:a.result});return}if((a==null?void 0:a.status)==="FAILED"){o=!0,m(),clearTimeout(i),s({success:!1,error:u||"Payment failed"});return}u&&!D&&!a&&(o=!0,m(),clearTimeout(i),s({success:!1,error:u}))}const b=l("currentPayment",n),y=l("error",n),S=l("isPaymentInProgress",n),m=E([b,y,S]);n()})}function O(){return t.getExchanges()}function H(){var e;return(e=t.state.currentPayment)==null?void 0:e.result}function L(){return t.state.error}function z(){return t.state.isPaymentInProgress}function l(e,r){return t.subscribeKey(e,r)}function E(e){return()=>{e.forEach(r=>{try{r()}catch{}})}}const B={network:"eip155:8453",asset:"native",metadata:{name:"Ethereum",symbol:"ETH",decimals:18}},G={network:"eip155:8453",asset:"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},W={network:"eip155:84532",asset:"native",metadata:{name:"Ethereum",symbol:"ETH",decimals:18}},J={network:"eip155:1",asset:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},V={network:"eip155:10",asset:"0x0b2c639c533813f4aa9d7837caf62653d097ff85",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},Z={network:"eip155:42161",asset:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},j={network:"eip155:137",asset:"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},Q={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},X={network:"eip155:1",asset:"0xdAC17F958D2ee523a2206206994597C13D831ec7",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},$={network:"eip155:10",asset:"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},ee={network:"eip155:42161",asset:"0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},te={network:"eip155:137",asset:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},ae={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},se={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"native",metadata:{name:"Solana",symbol:"SOL",decimals:9}};export{t as PayController,ne as W3mPayLoadingView,me as W3mPayQuoteView,ce as W3mPayView,Z as arbitrumUSDC,ee as arbitrumUSDT,B as baseETH,W as baseSepoliaETH,G as baseUSDC,J as ethereumUSDC,X as ethereumUSDT,O as getExchanges,z as getIsPaymentInProgress,L as getPayError,H as getPayResult,U as openPay,V as optimismUSDC,$ as optimismUSDT,M as pay,j as polygonUSDC,te as polygonUSDT,se as solanaSOL,Q as solanaUSDC,ae as solanaUSDT};
|