@directcryptopay/sdk 0.2.2 → 0.2.4
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/dist/ExchangeController-CbO41bcH.js +217 -0
- package/dist/HelpersUtil-DHm6EVSE.js +120 -0
- package/dist/NavigationUtil-kj9LEOOd.js +8 -0
- package/dist/PhArrowCircleDown-lsK25DCk.js +73 -0
- package/dist/PhArrowClockwise-NeKHZ1co.js +73 -0
- package/dist/PhArrowDown-C9AkNvLs.js +73 -0
- package/dist/PhArrowLeft-RNfIQP1X.js +73 -0
- package/dist/PhArrowRight-DM1tna0G.js +73 -0
- package/dist/PhArrowSquareOut-S5XYbAZj.js +73 -0
- package/dist/PhArrowUp-DmktzOWy.js +73 -0
- package/dist/PhArrowUpRight-BkNeW_5i.js +73 -0
- package/dist/PhArrowsClockwise-CQ4pG76b.js +73 -0
- package/dist/PhArrowsDownUp-H6gxaNM6.js +73 -0
- package/dist/PhArrowsLeftRight-DZSsfMR6.js +73 -0
- package/dist/PhBank-4_9QzqIB.js +73 -0
- package/dist/PhBrowser-B-JSznId.js +73 -0
- package/dist/PhCaretDown-vV5oHMNi.js +73 -0
- package/dist/PhCaretLeft-BLo6Y_f4.js +73 -0
- package/dist/PhCaretRight-CqQN4TT3.js +73 -0
- package/dist/PhCaretUp-Df7UCAHy.js +73 -0
- package/dist/PhCheck-gtpfK4ed.js +73 -0
- package/dist/PhCircleHalf-Uq7dwDYw.js +73 -0
- package/dist/PhClock-SDCW-NmF.js +73 -0
- package/dist/PhCompass-B7hgtdx-.js +73 -0
- package/dist/PhCopy-BcnhyXCy.js +73 -0
- package/dist/PhCreditCard-BJjByVgu.js +73 -0
- package/dist/PhCurrencyDollar-B7ZXqXBy.js +73 -0
- package/dist/PhDesktop-B3VKPuJx.js +73 -0
- package/dist/PhDeviceMobile-Bnd0TYEH.js +73 -0
- package/dist/PhDotsThree-yyMWyZ-R.js +73 -0
- package/dist/PhEnvelope-67uzHbI9.js +73 -0
- package/dist/PhFunnelSimple-B-DCsloI.js +73 -0
- package/dist/PhGlobe-TMm_6qGk.js +73 -0
- package/dist/PhIdentificationCard-CePPD2xc.js +73 -0
- package/dist/PhImage-gY96WtHR.js +73 -0
- package/dist/PhInfo-DRQM_ZDP.js +73 -0
- package/dist/PhLightbulb-B0TxPfZ1.js +73 -0
- package/dist/PhMagnifyingGlass-B8si5_6W.js +73 -0
- package/dist/PhPaperPlaneRight-DVu5PLYd.js +73 -0
- package/dist/PhPlus-BfTsQnUz.js +73 -0
- package/dist/PhPower-CxYUGOWn.js +73 -0
- package/dist/PhPuzzlePiece-CQ4wh0gV.js +73 -0
- package/dist/PhQrCode-BuJ97NYJ.js +73 -0
- package/dist/PhQuestion-kJoP8Mja.js +73 -0
- package/dist/PhQuestionMark-C46ZkFpu.js +73 -0
- package/dist/PhSealCheck-Eh8jVqSN.js +73 -0
- package/dist/PhSignOut-jk97OSVt.js +73 -0
- package/dist/PhSpinner-CiYOhwMg.js +73 -0
- package/dist/PhTrash-pxerMqzd.js +73 -0
- package/dist/PhUser-BMg0VV4A.js +73 -0
- package/dist/PhVault-DYQvx5A-.js +73 -0
- package/dist/PhWarning-NLC5Mj87.js +73 -0
- package/dist/PhWarningCircle-Ch2jU9fA.js +73 -0
- package/dist/PhX-Bx4wpwm3.js +73 -0
- package/dist/SwapController-Ch0FFTEt.js +457 -0
- package/dist/{ccip-BIGqktC1.js → ccip-BrGhNXIM.js} +4 -4
- package/dist/data-capture-CpafmuCb.js +490 -0
- package/dist/dcp-sdk.umd.js +7400 -6589
- package/dist/email-Dcg4jlai.js +344 -0
- package/dist/embedded-wallet-DeoRdAPw.js +820 -0
- package/dist/features-B9Nde43h.js +274 -0
- package/dist/{hashTypedData-ZH9ZnWu3.js → hashTypedData-a7b8tdkO.js} +6 -6
- package/dist/if-defined-k21LutCn.js +10 -0
- package/dist/index-9vLw53Xl.js +228 -0
- package/dist/index-B5wUyynz.js +107 -0
- package/dist/index-B8LkUrww.js +86 -0
- package/dist/{index-CPTcEPbD.js → index-BA0VwKg0.js} +296 -298
- package/dist/index-BB9JJ24N.js +125 -0
- package/dist/index-BCkEvPQ6.js +172 -0
- package/dist/index-BDeO_csr.js +171 -0
- package/dist/index-Bb7babLF.js +1281 -0
- package/dist/index-BjOhprVS.js +199 -0
- package/dist/{index-Dy4NyE6l.js → index-BjyMgZsf.js} +7 -7
- package/dist/index-BkThIDLX.js +159 -0
- package/dist/index-BmFs6nb7.js +209 -0
- package/dist/{index-5mp7WkhV.js → index-C4qc4PdD.js} +2 -2
- package/dist/{index-BdSIrl-R.js → index-CAPvUh14.js} +578 -570
- package/dist/index-CBMU3PTE.js +65 -0
- package/dist/index-CGwPkJLF.js +355 -0
- package/dist/index-CNGEqX3D.js +153 -0
- package/dist/index-CRlCq6IB.js +7981 -0
- package/dist/index-Cg_o-i9X.js +118 -0
- package/dist/index-D1BvhCbI.js +62 -0
- package/dist/index-DFi8TiHc.js +128 -0
- package/dist/index-DLwuveL9.js +555 -0
- package/dist/index-DMn7ktUQ.js +56 -0
- package/dist/index-DOXwtuwa.js +117 -0
- package/dist/index-DPPOW_Tp.js +118 -0
- package/dist/{index-f3LXSfM5.js → index-DQpzHpW-.js} +56 -142
- package/dist/{index-D6h-qfpt.js → index-DXHg5C-W.js} +5 -5
- package/dist/index-DcYjZV4H.js +110 -0
- package/dist/{index-BJ7cbG3N.js → index-DeL88Lwc.js} +36769 -40177
- package/dist/index-DrWVlf8b.js +46 -0
- package/dist/index-Dsfuc4rB.js +123 -0
- package/dist/index-DuTny38n.js +1175 -0
- package/dist/{index-D5r0iSq4.js → index-Nfjb6bV0.js} +1 -1
- package/dist/index-WwwdQSN2.js +85 -0
- package/dist/index-Yha9Afch.js +174 -0
- package/dist/index-cbQHN7GC.js +100 -0
- package/dist/{index-DobBVPe4.js → index-hyG3cYsv.js} +481 -236
- package/dist/index-qLxmmPaL.js +257 -0
- package/dist/index.js +1 -1
- package/dist/{localBatchGatewayRequest-CjGcn5nM.js → localBatchGatewayRequest-vfcvRH0G.js} +1 -1
- package/dist/onramp-BSiyOX4L.js +855 -0
- package/dist/{parseSignature-S8VEpRHC.js → parseSignature-CdCMAPZN.js} +2312 -2313
- package/dist/pay-with-exchange-CduNoMEz.js +525 -0
- package/dist/property-Bd8U3_QP.js +618 -0
- package/dist/receive-CrmptJlq.js +232 -0
- package/dist/ref-SOwYtCZb.js +107 -0
- package/dist/send-oMcHMEr6.js +1166 -0
- package/dist/socials-C0A4-FbY.js +620 -0
- package/dist/swaps-CbJJ9Ciu.js +1760 -0
- package/dist/{transactions-DujFkB-M.js → transactions-BDfCoBS5.js} +10 -10
- package/dist/w3m-modal-BjsTkny7.js +1706 -0
- package/package.json +3 -3
- package/dist/ConstantsUtil-B-_-u8aQ.js +0 -6
- package/dist/add-sji6scSD.js +0 -19
- package/dist/all-wallets-B4H-890E.js +0 -10
- package/dist/app-store-Z433s97G.js +0 -21
- package/dist/apple-b8Lxj7nb.js +0 -22
- package/dist/arrow-bottom-M9oWWo_9.js +0 -12
- package/dist/arrow-bottom-circle-N9c4CXY1.js +0 -15
- package/dist/arrow-left-Dw8AKfwf.js +0 -12
- package/dist/arrow-right-DwLQZSC_.js +0 -12
- package/dist/arrow-top-zhUjkBe1.js +0 -12
- package/dist/bank-CbQdnILK.js +0 -18
- package/dist/browser-xAqNwt7z.js +0 -18
- package/dist/card-Dr1QBmWp.js +0 -18
- package/dist/checkmark-BhT1dTgG.js +0 -15
- package/dist/checkmark-bold-CPB29wqQ.js +0 -12
- package/dist/chevron-bottom-BhNyx2II.js +0 -12
- package/dist/chevron-left-CGuEjQlY.js +0 -12
- package/dist/chevron-right-CvIRRsqZ.js +0 -12
- package/dist/chevron-top-RSzCqjBd.js +0 -12
- package/dist/chrome-store-Cs8dAgs0.js +0 -65
- package/dist/clock-fhZO5otC.js +0 -12
- package/dist/close-BPuztrdR.js +0 -12
- package/dist/coinPlaceholder-C8X2i7Kh.js +0 -12
- package/dist/compass-WMc5huk0.js +0 -12
- package/dist/copy-DVAeT17y.js +0 -19
- package/dist/cursor-BJ4YLXfy.js +0 -7
- package/dist/cursor-transparent-DN2fLQN4.js +0 -16
- package/dist/desktop-6avxisBw.js +0 -13
- package/dist/disconnect-AReVI8Gk.js +0 -12
- package/dist/discord-CxrI30BZ.js +0 -21
- package/dist/email-B8dIIaay.js +0 -696
- package/dist/embedded-wallet-C_5hF7rM.js +0 -468
- package/dist/etherscan-BnAy8cIF.js +0 -10
- package/dist/exclamation-triangle-Bu7nHwx9.js +0 -8
- package/dist/extension-F0LIhvcf.js +0 -12
- package/dist/external-link-CP6phyaM.js +0 -12
- package/dist/facebook-BtQ-Io2y.js +0 -30
- package/dist/farcaster-BmaN1ugd.js +0 -16
- package/dist/filters-DpEwoOmy.js +0 -12
- package/dist/github-q7qO9V-b.js +0 -22
- package/dist/google-DH_ZE8bW.js +0 -22
- package/dist/help-circle-BAQVmKas.js +0 -16
- package/dist/id-Cj68Zwgo.js +0 -16
- package/dist/if-defined-CNte9B3N.js +0 -744
- package/dist/image-BKJDw6N-.js +0 -8
- package/dist/index-7toZMdtG.js +0 -573
- package/dist/index-B1uKzdvN.js +0 -170
- package/dist/index-BHFZVF-b.js +0 -257
- package/dist/index-BKwa5JSA.js +0 -559
- package/dist/index-BP4B9VUt.js +0 -54
- package/dist/index-BVdzXHpO.js +0 -181
- package/dist/index-BYND0GJ9.js +0 -146
- package/dist/index-BaJ0zEbh.js +0 -97
- package/dist/index-Bh0MPFwP.js +0 -58
- package/dist/index-Bsh7_qTp.js +0 -511
- package/dist/index-BwnXTNNg.js +0 -199
- package/dist/index-C0kPDbg_.js +0 -77
- package/dist/index-CKikVKe2.js +0 -75
- package/dist/index-ChVh0Hkp.js +0 -243
- package/dist/index-Cle_NnnS.js +0 -305
- package/dist/index-CmWdvIFT.js +0 -51
- package/dist/index-D2AMA8Bu.js +0 -65
- package/dist/index-DAUM8CO4.js +0 -65
- package/dist/index-DGjZW6uR.js +0 -78
- package/dist/index-DQe94z7X.js +0 -265
- package/dist/index-DTo6w99t.js +0 -7864
- package/dist/index-DYdXjap2.js +0 -320
- package/dist/index-DceCxNV5.js +0 -181
- package/dist/index-Uw9cSw0q.js +0 -294
- package/dist/index-qiuyrukh.js +0 -45
- package/dist/index-zddvaohA.js +0 -78
- package/dist/info-RfPsmroW.js +0 -7
- package/dist/info-circle-DFKHB_ZN.js +0 -16
- package/dist/lightbulb-B-Bykj9X.js +0 -7
- package/dist/mail-mBAgGuw5.js +0 -12
- package/dist/mobile-Dhh3ndkf.js +0 -13
- package/dist/more-D1h7UTvg.js +0 -15
- package/dist/network-placeholder-Dqynvc-t.js +0 -18
- package/dist/nftPlaceholder-Df7MW4MM.js +0 -12
- package/dist/off-BmG3cHTX.js +0 -12
- package/dist/onramp-C401Aenb.js +0 -1279
- package/dist/play-store-4q1fzL_P.js +0 -36
- package/dist/plus-603Gs3yG.js +0 -17
- package/dist/qr-code-Dgwhf6M1.js +0 -10
- package/dist/receive-CYXbbEUR.js +0 -186
- package/dist/recycle-horizontal-Bu8zZ563.js +0 -13
- package/dist/ref-DpmKRWBK.js +0 -41
- package/dist/refresh-BMZFu0mu.js +0 -12
- package/dist/reown-logo-BXph7ThY.js +0 -16
- package/dist/search-Cm_V42Y_.js +0 -12
- package/dist/secp256k1-C0iX1TUr.js +0 -1510
- package/dist/secp256k1-DOQBqE4Z.js +0 -1302
- package/dist/send-BSMYxDuP.js +0 -19
- package/dist/send-C8EeIzRB.js +0 -1038
- package/dist/socials-DQrHQajs.js +0 -574
- package/dist/swapHorizontal-98rnJewS.js +0 -12
- package/dist/swapHorizontalBold-C299FjEt.js +0 -12
- package/dist/swapHorizontalMedium-Cqm6i4WJ.js +0 -20
- package/dist/swapHorizontalRoundedBold-De7hFfqZ.js +0 -12
- package/dist/swapVertical-DSL75l8L.js +0 -12
- package/dist/swaps-BuTNp65Y.js +0 -1637
- package/dist/telegram-cJP7hgUb.js +0 -20
- package/dist/three-dots-DHnEh28O.js +0 -9
- package/dist/twitch-CR2iGcBo.js +0 -22
- package/dist/twitterIcon-E5TAQjOn.js +0 -10
- package/dist/verify-DEukUJp0.js +0 -12
- package/dist/verify-filled-BXsx1i_p.js +0 -12
- package/dist/w3m-modal-Bm7BqVng.js +0 -1037
- package/dist/wallet-CzyyvdrT.js +0 -12
- package/dist/wallet-placeholder-BrcmyGEe.js +0 -18
- package/dist/walletconnect-BSYogWiE.js +0 -36
- package/dist/warning-circle-Cgp2BW3m.js +0 -16
- package/dist/x-BJinLpTw.js +0 -16
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "./
|
|
4
|
-
import "./index-
|
|
5
|
-
import "./index-
|
|
6
|
-
import "./index-
|
|
7
|
-
import "./index-
|
|
8
|
-
import "./index-
|
|
9
|
-
import "./index-
|
|
10
|
-
import "./index-
|
|
1
|
+
import { cM as $, dz as b, cG as C, cE as p, d2 as g, dA as B, d1 as w, dB as j, cC as q, cF as _, cH as T, d0 as L, df as x, cR as z, cS as X, c_ as F, cX as W, cY as m, di as J, d8 as M, dh as Z } from "./index-DeL88Lwc.js";
|
|
2
|
+
import { r as h, c as H } from "./index-DuTny38n.js";
|
|
3
|
+
import { o as Y } from "./if-defined-k21LutCn.js";
|
|
4
|
+
import "./index-BmFs6nb7.js";
|
|
5
|
+
import "./index-BCkEvPQ6.js";
|
|
6
|
+
import "./index-DOXwtuwa.js";
|
|
7
|
+
import "./index-DFi8TiHc.js";
|
|
8
|
+
import "./index-DPPOW_Tp.js";
|
|
9
|
+
import "./index-B8LkUrww.js";
|
|
10
|
+
import "./index-BB9JJ24N.js";
|
|
11
|
+
import "./index-DrWVlf8b.js";
|
|
12
|
+
import "./index-Dsfuc4rB.js";
|
|
13
|
+
import "./index-CBMU3PTE.js";
|
|
11
14
|
const o = {
|
|
12
15
|
INVALID_PAYMENT_CONFIG: "INVALID_PAYMENT_CONFIG",
|
|
13
16
|
INVALID_RECIPIENT: "INVALID_RECIPIENT",
|
|
@@ -21,7 +24,7 @@ const o = {
|
|
|
21
24
|
ASSET_NOT_SUPPORTED: "ASSET_NOT_SUPPORTED",
|
|
22
25
|
UNABLE_TO_GET_PAY_URL: "UNABLE_TO_GET_PAY_URL",
|
|
23
26
|
UNABLE_TO_GET_BUY_STATUS: "UNABLE_TO_GET_BUY_STATUS"
|
|
24
|
-
},
|
|
27
|
+
}, N = {
|
|
25
28
|
[o.INVALID_PAYMENT_CONFIG]: "Invalid payment configuration",
|
|
26
29
|
[o.INVALID_RECIPIENT]: "Invalid recipient address",
|
|
27
30
|
[o.INVALID_ASSET]: "Invalid asset specified",
|
|
@@ -37,44 +40,49 @@ const o = {
|
|
|
37
40
|
};
|
|
38
41
|
class c extends Error {
|
|
39
42
|
get message() {
|
|
40
|
-
return
|
|
43
|
+
return N[this.code];
|
|
41
44
|
}
|
|
42
45
|
constructor(e, s) {
|
|
43
|
-
super(
|
|
46
|
+
super(N[e]), this.name = "AppKitPayError", this.code = e, this.details = s, Error.captureStackTrace && Error.captureStackTrace(this, c);
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
|
-
const
|
|
47
|
-
class
|
|
49
|
+
const Q = "https://rpc.walletconnect.org/v1/json-rpc";
|
|
50
|
+
class ee extends Error {
|
|
48
51
|
}
|
|
49
|
-
function
|
|
50
|
-
const t =
|
|
51
|
-
return `${
|
|
52
|
+
function te() {
|
|
53
|
+
const t = $.getSnapshot().projectId;
|
|
54
|
+
return `${Q}?projectId=${t}`;
|
|
52
55
|
}
|
|
53
|
-
async function
|
|
54
|
-
const s =
|
|
56
|
+
async function O(t, e) {
|
|
57
|
+
const s = te(), { sdkType: a, sdkVersion: r, projectId: i } = $.getSnapshot(), u = {
|
|
58
|
+
jsonrpc: "2.0",
|
|
59
|
+
id: 1,
|
|
60
|
+
method: t,
|
|
61
|
+
params: {
|
|
62
|
+
...e || {},
|
|
63
|
+
st: a,
|
|
64
|
+
sv: r,
|
|
65
|
+
projectId: i
|
|
66
|
+
}
|
|
67
|
+
}, A = await (await fetch(s, {
|
|
55
68
|
method: "POST",
|
|
56
|
-
body: JSON.stringify(
|
|
57
|
-
jsonrpc: "2.0",
|
|
58
|
-
id: 1,
|
|
59
|
-
method: t,
|
|
60
|
-
params: e
|
|
61
|
-
}),
|
|
69
|
+
body: JSON.stringify(u),
|
|
62
70
|
headers: { "Content-Type": "application/json" }
|
|
63
71
|
})).json();
|
|
64
|
-
if (
|
|
65
|
-
throw new
|
|
66
|
-
return
|
|
72
|
+
if (A.error)
|
|
73
|
+
throw new ee(A.error.message);
|
|
74
|
+
return A;
|
|
67
75
|
}
|
|
68
|
-
async function
|
|
69
|
-
return (await
|
|
76
|
+
async function G(t) {
|
|
77
|
+
return (await O("reown_getExchanges", t)).result;
|
|
70
78
|
}
|
|
71
|
-
async function
|
|
72
|
-
return (await
|
|
79
|
+
async function ne(t) {
|
|
80
|
+
return (await O("reown_getExchangePayUrl", t)).result;
|
|
73
81
|
}
|
|
74
|
-
async function
|
|
75
|
-
return (await
|
|
82
|
+
async function se(t) {
|
|
83
|
+
return (await O("reown_getExchangeBuyStatus", t)).result;
|
|
76
84
|
}
|
|
77
|
-
const
|
|
85
|
+
const ae = ["eip155", "solana"], re = {
|
|
78
86
|
eip155: {
|
|
79
87
|
native: { assetNamespace: "slip44", assetReference: "60" },
|
|
80
88
|
defaultTokenNamespace: "erc20"
|
|
@@ -84,45 +92,45 @@ const J = ["eip155"], Z = {
|
|
|
84
92
|
defaultTokenNamespace: "token"
|
|
85
93
|
}
|
|
86
94
|
};
|
|
87
|
-
function
|
|
88
|
-
const { chainNamespace: s, chainId: a } =
|
|
95
|
+
function R(t, e) {
|
|
96
|
+
const { chainNamespace: s, chainId: a } = b.parseCaipNetworkId(t), r = re[s];
|
|
89
97
|
if (!r)
|
|
90
98
|
throw new Error(`Unsupported chain namespace for CAIP-19 formatting: ${s}`);
|
|
91
99
|
let i = r.native.assetNamespace, u = r.native.assetReference;
|
|
92
100
|
return e !== "native" && (i = r.defaultTokenNamespace, u = e), `${`${s}:${a}`}/${i}:${u}`;
|
|
93
101
|
}
|
|
94
|
-
function
|
|
95
|
-
const { chainNamespace: e } =
|
|
96
|
-
return
|
|
102
|
+
function ie(t) {
|
|
103
|
+
const { chainNamespace: e } = b.parseCaipNetworkId(t);
|
|
104
|
+
return ae.includes(e);
|
|
97
105
|
}
|
|
98
|
-
async function
|
|
99
|
-
const { paymentAssetNetwork: e, activeCaipNetwork: s, approvedCaipNetworkIds: a, requestedCaipNetworks: r } = t, u =
|
|
106
|
+
async function oe(t) {
|
|
107
|
+
const { paymentAssetNetwork: e, activeCaipNetwork: s, approvedCaipNetworkIds: a, requestedCaipNetworks: r } = t, u = C.sortRequestedNetworks(a, r).find((P) => P.caipNetworkId === e);
|
|
100
108
|
if (!u)
|
|
101
109
|
throw new c(o.INVALID_PAYMENT_CONFIG);
|
|
102
110
|
if (u.caipNetworkId === s.caipNetworkId)
|
|
103
111
|
return;
|
|
104
|
-
const
|
|
105
|
-
if (!((a == null ? void 0 : a.includes(u.caipNetworkId)) ||
|
|
112
|
+
const d = p.getNetworkProp("supportsAllNetworks", u.chainNamespace);
|
|
113
|
+
if (!((a == null ? void 0 : a.includes(u.caipNetworkId)) || d))
|
|
106
114
|
throw new c(o.INVALID_PAYMENT_CONFIG);
|
|
107
115
|
try {
|
|
108
|
-
await
|
|
109
|
-
} catch (
|
|
110
|
-
throw new c(o.GENERIC_PAYMENT_ERROR,
|
|
116
|
+
await p.switchActiveNetwork(u);
|
|
117
|
+
} catch (P) {
|
|
118
|
+
throw new c(o.GENERIC_PAYMENT_ERROR, P);
|
|
111
119
|
}
|
|
112
120
|
}
|
|
113
|
-
async function
|
|
114
|
-
var
|
|
115
|
-
if (e !==
|
|
121
|
+
async function ce(t, e, s) {
|
|
122
|
+
var d;
|
|
123
|
+
if (e !== g.CHAIN.EVM)
|
|
116
124
|
throw new c(o.INVALID_CHAIN_NAMESPACE);
|
|
117
125
|
if (!s.fromAddress)
|
|
118
126
|
throw new c(o.INVALID_PAYMENT_CONFIG, "fromAddress is required for native EVM payments.");
|
|
119
127
|
const a = typeof s.amount == "string" ? parseFloat(s.amount) : s.amount;
|
|
120
128
|
if (isNaN(a))
|
|
121
129
|
throw new c(o.INVALID_PAYMENT_CONFIG);
|
|
122
|
-
const r = ((
|
|
130
|
+
const r = ((d = t.metadata) == null ? void 0 : d.decimals) ?? 18, i = w.parseUnits(a.toString(), r);
|
|
123
131
|
if (typeof i != "bigint")
|
|
124
132
|
throw new c(o.GENERIC_PAYMENT_ERROR);
|
|
125
|
-
return await
|
|
133
|
+
return await w.sendTransaction({
|
|
126
134
|
chainNamespace: e,
|
|
127
135
|
to: s.recipient,
|
|
128
136
|
address: s.fromAddress,
|
|
@@ -130,22 +138,46 @@ async function te(t, e, s) {
|
|
|
130
138
|
data: "0x"
|
|
131
139
|
}) ?? void 0;
|
|
132
140
|
}
|
|
133
|
-
async function
|
|
141
|
+
async function ue(t, e) {
|
|
134
142
|
if (!e.fromAddress)
|
|
135
143
|
throw new c(o.INVALID_PAYMENT_CONFIG, "fromAddress is required for ERC20 EVM payments.");
|
|
136
|
-
const s = t.asset, a = e.recipient, r = Number(t.metadata.decimals), i =
|
|
144
|
+
const s = t.asset, a = e.recipient, r = Number(t.metadata.decimals), i = w.parseUnits(e.amount.toString(), r);
|
|
137
145
|
if (i === void 0)
|
|
138
146
|
throw new c(o.GENERIC_PAYMENT_ERROR);
|
|
139
|
-
return await
|
|
147
|
+
return await w.writeContract({
|
|
140
148
|
fromAddress: e.fromAddress,
|
|
141
149
|
tokenAddress: s,
|
|
142
150
|
args: [a, i],
|
|
143
151
|
method: "transfer",
|
|
144
|
-
abi:
|
|
145
|
-
chainNamespace:
|
|
152
|
+
abi: j.getERC20Abi(s),
|
|
153
|
+
chainNamespace: g.CHAIN.EVM
|
|
146
154
|
}) ?? void 0;
|
|
147
155
|
}
|
|
148
|
-
|
|
156
|
+
async function le(t, e) {
|
|
157
|
+
if (t !== g.CHAIN.SOLANA)
|
|
158
|
+
throw new c(o.INVALID_CHAIN_NAMESPACE);
|
|
159
|
+
if (!e.fromAddress)
|
|
160
|
+
throw new c(o.INVALID_PAYMENT_CONFIG, "fromAddress is required for Solana payments.");
|
|
161
|
+
const s = typeof e.amount == "string" ? parseFloat(e.amount) : e.amount;
|
|
162
|
+
if (isNaN(s) || s <= 0)
|
|
163
|
+
throw new c(o.INVALID_PAYMENT_CONFIG, "Invalid payment amount.");
|
|
164
|
+
try {
|
|
165
|
+
if (!B.getProvider(t))
|
|
166
|
+
throw new c(o.GENERIC_PAYMENT_ERROR, "No Solana provider available.");
|
|
167
|
+
const r = await w.sendTransaction({
|
|
168
|
+
chainNamespace: g.CHAIN.SOLANA,
|
|
169
|
+
to: e.recipient,
|
|
170
|
+
value: s,
|
|
171
|
+
tokenMint: e.tokenMint
|
|
172
|
+
});
|
|
173
|
+
if (!r)
|
|
174
|
+
throw new c(o.GENERIC_PAYMENT_ERROR, "Transaction failed.");
|
|
175
|
+
return r;
|
|
176
|
+
} catch (a) {
|
|
177
|
+
throw a instanceof c ? a : new c(o.GENERIC_PAYMENT_ERROR, `Solana payment failed: ${a}`);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
const V = 0, v = "unknown", n = q({
|
|
149
181
|
paymentAsset: {
|
|
150
182
|
network: "eip155:1",
|
|
151
183
|
asset: "0x0",
|
|
@@ -171,13 +203,13 @@ const D = 0, v = "unknown", n = W({
|
|
|
171
203
|
}), l = {
|
|
172
204
|
state: n,
|
|
173
205
|
subscribe(t) {
|
|
174
|
-
return
|
|
206
|
+
return X(n, () => t(n));
|
|
175
207
|
},
|
|
176
208
|
subscribeKey(t, e) {
|
|
177
|
-
return
|
|
209
|
+
return z(n, t, e);
|
|
178
210
|
},
|
|
179
211
|
async handleOpenPay(t) {
|
|
180
|
-
this.resetState(), this.setPaymentConfig(t), this.subscribeEvents(), this.initializeAnalytics(), n.isConfigured = !0,
|
|
212
|
+
this.resetState(), this.setPaymentConfig(t), this.subscribeEvents(), this.initializeAnalytics(), n.isConfigured = !0, _.sendEvent({
|
|
181
213
|
type: "track",
|
|
182
214
|
event: "PAY_MODAL_OPEN",
|
|
183
215
|
properties: {
|
|
@@ -189,7 +221,7 @@ const D = 0, v = "unknown", n = W({
|
|
|
189
221
|
amount: n.amount
|
|
190
222
|
}
|
|
191
223
|
}
|
|
192
|
-
}), await
|
|
224
|
+
}), await x.open({
|
|
193
225
|
view: "Pay"
|
|
194
226
|
});
|
|
195
227
|
},
|
|
@@ -218,14 +250,14 @@ const D = 0, v = "unknown", n = W({
|
|
|
218
250
|
async fetchExchanges() {
|
|
219
251
|
try {
|
|
220
252
|
n.isLoading = !0;
|
|
221
|
-
const t = await
|
|
222
|
-
page:
|
|
223
|
-
asset:
|
|
253
|
+
const t = await G({
|
|
254
|
+
page: V,
|
|
255
|
+
asset: R(n.paymentAsset.network, n.paymentAsset.asset),
|
|
224
256
|
amount: n.amount.toString()
|
|
225
257
|
});
|
|
226
258
|
n.exchanges = t.exchanges.slice(0, 2);
|
|
227
259
|
} catch {
|
|
228
|
-
throw
|
|
260
|
+
throw T.showError(N.UNABLE_TO_GET_EXCHANGES), new c(o.UNABLE_TO_GET_EXCHANGES);
|
|
229
261
|
} finally {
|
|
230
262
|
n.isLoading = !1;
|
|
231
263
|
}
|
|
@@ -233,9 +265,9 @@ const D = 0, v = "unknown", n = W({
|
|
|
233
265
|
async getAvailableExchanges(t) {
|
|
234
266
|
var e;
|
|
235
267
|
try {
|
|
236
|
-
const s = t != null && t.asset && (t != null && t.network) ?
|
|
237
|
-
return await
|
|
238
|
-
page: (t == null ? void 0 : t.page) ??
|
|
268
|
+
const s = t != null && t.asset && (t != null && t.network) ? R(t.network, t.asset) : void 0;
|
|
269
|
+
return await G({
|
|
270
|
+
page: (t == null ? void 0 : t.page) ?? V,
|
|
239
271
|
asset: s,
|
|
240
272
|
amount: (e = t == null ? void 0 : t.amount) == null ? void 0 : e.toString()
|
|
241
273
|
});
|
|
@@ -245,16 +277,17 @@ const D = 0, v = "unknown", n = W({
|
|
|
245
277
|
},
|
|
246
278
|
async getPayUrl(t, e, s = !1) {
|
|
247
279
|
try {
|
|
248
|
-
const a = Number(e.amount), r = await
|
|
280
|
+
const a = Number(e.amount), r = await ne({
|
|
249
281
|
exchangeId: t,
|
|
250
|
-
asset:
|
|
282
|
+
asset: R(e.network, e.asset),
|
|
251
283
|
amount: a.toString(),
|
|
252
284
|
recipient: `${e.network}:${e.recipient}`
|
|
253
285
|
});
|
|
254
|
-
return
|
|
286
|
+
return _.sendEvent({
|
|
255
287
|
type: "track",
|
|
256
288
|
event: "PAY_EXCHANGE_SELECTED",
|
|
257
289
|
properties: {
|
|
290
|
+
source: "pay",
|
|
258
291
|
exchange: {
|
|
259
292
|
id: t
|
|
260
293
|
},
|
|
@@ -270,10 +303,11 @@ const D = 0, v = "unknown", n = W({
|
|
|
270
303
|
},
|
|
271
304
|
headless: s
|
|
272
305
|
}
|
|
273
|
-
}), s && (this.initiatePayment(),
|
|
306
|
+
}), s && (this.initiatePayment(), _.sendEvent({
|
|
274
307
|
type: "track",
|
|
275
308
|
event: "PAY_INITIATED",
|
|
276
309
|
properties: {
|
|
310
|
+
source: "pay",
|
|
277
311
|
paymentId: n.paymentId || v,
|
|
278
312
|
configuration: {
|
|
279
313
|
network: e.network,
|
|
@@ -297,17 +331,19 @@ const D = 0, v = "unknown", n = W({
|
|
|
297
331
|
if (!a)
|
|
298
332
|
throw new c(o.UNABLE_TO_GET_PAY_URL);
|
|
299
333
|
const i = t.openInNewTab ?? !0 ? "_blank" : "_self";
|
|
300
|
-
return
|
|
334
|
+
return C.openHref(a.url, i), a;
|
|
301
335
|
} catch (a) {
|
|
302
|
-
throw a instanceof c ? n.error = a.message : n.error =
|
|
336
|
+
throw a instanceof c ? n.error = a.message : n.error = N.GENERIC_PAYMENT_ERROR, new c(o.UNABLE_TO_GET_PAY_URL);
|
|
303
337
|
}
|
|
304
338
|
},
|
|
305
339
|
subscribeEvents() {
|
|
306
|
-
n.isConfigured || (
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
t &&
|
|
340
|
+
n.isConfigured || (w.subscribeKey("connections", (t) => {
|
|
341
|
+
t.size > 0 && this.handlePayment();
|
|
342
|
+
}), p.subscribeChainProp("accountState", (t) => {
|
|
343
|
+
const e = w.hasAnyConnection(g.CONNECTOR_ID.WALLET_CONNECT);
|
|
344
|
+
t != null && t.caipAddress && (e ? setTimeout(() => {
|
|
345
|
+
this.handlePayment();
|
|
346
|
+
}, 100) : this.handlePayment());
|
|
311
347
|
}));
|
|
312
348
|
},
|
|
313
349
|
async handlePayment() {
|
|
@@ -315,41 +351,49 @@ const D = 0, v = "unknown", n = W({
|
|
|
315
351
|
type: "wallet",
|
|
316
352
|
status: "IN_PROGRESS"
|
|
317
353
|
};
|
|
318
|
-
const t =
|
|
354
|
+
const t = p.getActiveCaipAddress();
|
|
319
355
|
if (!t)
|
|
320
356
|
return;
|
|
321
|
-
const { chainId: e, address: s } =
|
|
322
|
-
if (!s || !e || !a || !
|
|
357
|
+
const { chainId: e, address: s } = b.parseCaipAddress(t), a = p.state.activeChain;
|
|
358
|
+
if (!s || !e || !a || !B.getProvider(a))
|
|
323
359
|
return;
|
|
324
|
-
const i =
|
|
360
|
+
const i = p.state.activeCaipNetwork;
|
|
325
361
|
if (i && !n.isPaymentInProgress)
|
|
326
362
|
try {
|
|
327
363
|
this.initiatePayment();
|
|
328
|
-
const u =
|
|
329
|
-
switch (await
|
|
364
|
+
const u = p.getAllRequestedCaipNetworks(), d = p.getAllApprovedCaipNetworkIds();
|
|
365
|
+
switch (await oe({
|
|
330
366
|
paymentAssetNetwork: n.paymentAsset.network,
|
|
331
367
|
activeCaipNetwork: i,
|
|
332
|
-
approvedCaipNetworkIds:
|
|
368
|
+
approvedCaipNetworkIds: d,
|
|
333
369
|
requestedCaipNetworks: u
|
|
334
|
-
}), await
|
|
370
|
+
}), await x.open({
|
|
335
371
|
view: "PayLoading"
|
|
336
372
|
}), a) {
|
|
337
|
-
case
|
|
338
|
-
n.paymentAsset.asset === "native" && (n.currentPayment.result = await
|
|
373
|
+
case g.CHAIN.EVM:
|
|
374
|
+
n.paymentAsset.asset === "native" && (n.currentPayment.result = await ce(n.paymentAsset, a, {
|
|
339
375
|
recipient: n.recipient,
|
|
340
376
|
amount: n.amount,
|
|
341
377
|
fromAddress: s
|
|
342
|
-
})), n.paymentAsset.asset.startsWith("0x") && (n.currentPayment.result = await
|
|
378
|
+
})), n.paymentAsset.asset.startsWith("0x") && (n.currentPayment.result = await ue(n.paymentAsset, {
|
|
343
379
|
recipient: n.recipient,
|
|
344
380
|
amount: n.amount,
|
|
345
381
|
fromAddress: s
|
|
346
382
|
})), n.currentPayment.status = "SUCCESS";
|
|
347
383
|
break;
|
|
384
|
+
case g.CHAIN.SOLANA:
|
|
385
|
+
n.currentPayment.result = await le(a, {
|
|
386
|
+
recipient: n.recipient,
|
|
387
|
+
amount: n.amount,
|
|
388
|
+
fromAddress: s,
|
|
389
|
+
tokenMint: n.paymentAsset.asset === "native" ? void 0 : n.paymentAsset.asset
|
|
390
|
+
}), n.currentPayment.status = "SUCCESS";
|
|
391
|
+
break;
|
|
348
392
|
default:
|
|
349
393
|
throw new c(o.INVALID_CHAIN_NAMESPACE);
|
|
350
394
|
}
|
|
351
395
|
} catch (u) {
|
|
352
|
-
u instanceof c ? n.error = u.message : n.error =
|
|
396
|
+
u instanceof c ? n.error = u.message : n.error = N.GENERIC_PAYMENT_ERROR, n.currentPayment.status = "FAILED", T.showError(n.error);
|
|
353
397
|
} finally {
|
|
354
398
|
n.isPaymentInProgress = !1;
|
|
355
399
|
}
|
|
@@ -369,14 +413,14 @@ const D = 0, v = "unknown", n = W({
|
|
|
369
413
|
throw new c(o.INVALID_AMOUNT);
|
|
370
414
|
},
|
|
371
415
|
handlePayWithWallet() {
|
|
372
|
-
const t =
|
|
416
|
+
const t = p.getActiveCaipAddress();
|
|
373
417
|
if (!t) {
|
|
374
|
-
|
|
418
|
+
L.push("Connect");
|
|
375
419
|
return;
|
|
376
420
|
}
|
|
377
|
-
const { chainId: e, address: s } =
|
|
421
|
+
const { chainId: e, address: s } = b.parseCaipAddress(t), a = p.state.activeChain;
|
|
378
422
|
if (!s || !e || !a) {
|
|
379
|
-
|
|
423
|
+
L.push("Connect");
|
|
380
424
|
return;
|
|
381
425
|
}
|
|
382
426
|
this.handlePayment();
|
|
@@ -400,17 +444,19 @@ const D = 0, v = "unknown", n = W({
|
|
|
400
444
|
openInNewTab: n.openInNewTab
|
|
401
445
|
};
|
|
402
446
|
} catch (e) {
|
|
403
|
-
return e instanceof c ? n.error = e.message : n.error =
|
|
447
|
+
return e instanceof c ? n.error = e.message : n.error = N.GENERIC_PAYMENT_ERROR, n.isPaymentInProgress = !1, T.showError(n.error), null;
|
|
404
448
|
}
|
|
405
449
|
},
|
|
406
450
|
async getBuyStatus(t, e) {
|
|
407
451
|
var s, a;
|
|
408
452
|
try {
|
|
409
|
-
const r = await
|
|
410
|
-
return (r.status === "SUCCESS" || r.status === "FAILED") &&
|
|
453
|
+
const r = await se({ sessionId: e, exchangeId: t });
|
|
454
|
+
return (r.status === "SUCCESS" || r.status === "FAILED") && _.sendEvent({
|
|
411
455
|
type: "track",
|
|
412
456
|
event: r.status === "SUCCESS" ? "PAY_SUCCESS" : "PAY_ERROR",
|
|
413
457
|
properties: {
|
|
458
|
+
message: r.status === "FAILED" ? C.parseError(n.error) : void 0,
|
|
459
|
+
source: "pay",
|
|
414
460
|
paymentId: n.paymentId || v,
|
|
415
461
|
configuration: {
|
|
416
462
|
network: n.paymentAsset.network,
|
|
@@ -450,10 +496,12 @@ const D = 0, v = "unknown", n = W({
|
|
|
450
496
|
SUCCESS: "PAY_SUCCESS",
|
|
451
497
|
FAILED: "PAY_ERROR"
|
|
452
498
|
}[n.currentPayment.status];
|
|
453
|
-
|
|
499
|
+
_.sendEvent({
|
|
454
500
|
type: "track",
|
|
455
501
|
event: s,
|
|
456
502
|
properties: {
|
|
503
|
+
message: n.currentPayment.status === "FAILED" ? C.parseError(n.error) : void 0,
|
|
504
|
+
source: "pay",
|
|
457
505
|
paymentId: n.paymentId || v,
|
|
458
506
|
configuration: {
|
|
459
507
|
network: n.paymentAsset.network,
|
|
@@ -472,19 +520,19 @@ const D = 0, v = "unknown", n = W({
|
|
|
472
520
|
}
|
|
473
521
|
}));
|
|
474
522
|
}
|
|
475
|
-
},
|
|
523
|
+
}, de = F`
|
|
476
524
|
wui-separator {
|
|
477
|
-
margin: var(--
|
|
478
|
-
calc(var(--
|
|
479
|
-
width: calc(100% + var(--
|
|
525
|
+
margin: var(--apkt-spacing-3) calc(var(--apkt-spacing-3) * -1) var(--apkt-spacing-2)
|
|
526
|
+
calc(var(--apkt-spacing-3) * -1);
|
|
527
|
+
width: calc(100% + var(--apkt-spacing-3) * 2);
|
|
480
528
|
}
|
|
481
529
|
|
|
482
530
|
.token-display {
|
|
483
|
-
padding: var(--
|
|
484
|
-
border-radius: var(--
|
|
485
|
-
background-color: var(--
|
|
486
|
-
margin-top: var(--
|
|
487
|
-
margin-bottom: var(--
|
|
531
|
+
padding: var(--apkt-spacing-3) var(--apkt-spacing-3);
|
|
532
|
+
border-radius: var(--apkt-borderRadius-5);
|
|
533
|
+
background-color: var(--apkt-tokens-theme-backgroundPrimary);
|
|
534
|
+
margin-top: var(--apkt-spacing-3);
|
|
535
|
+
margin-bottom: var(--apkt-spacing-3);
|
|
488
536
|
}
|
|
489
537
|
|
|
490
538
|
.token-display wui-text {
|
|
@@ -492,29 +540,33 @@ const D = 0, v = "unknown", n = W({
|
|
|
492
540
|
}
|
|
493
541
|
|
|
494
542
|
wui-loading-spinner {
|
|
495
|
-
padding: var(--
|
|
543
|
+
padding: var(--apkt-spacing-2);
|
|
496
544
|
}
|
|
497
545
|
`;
|
|
498
|
-
var
|
|
546
|
+
var E = function(t, e, s, a) {
|
|
499
547
|
var r = arguments.length, i = r < 3 ? e : a === null ? a = Object.getOwnPropertyDescriptor(e, s) : a, u;
|
|
500
548
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(t, e, s, a);
|
|
501
|
-
else for (var
|
|
549
|
+
else for (var d = t.length - 1; d >= 0; d--) (u = t[d]) && (i = (r < 3 ? u(i) : r > 3 ? u(e, s, i) : u(e, s)) || i);
|
|
502
550
|
return r > 3 && i && Object.defineProperty(e, s, i), i;
|
|
503
551
|
};
|
|
504
|
-
let
|
|
552
|
+
let y = class extends W {
|
|
505
553
|
constructor() {
|
|
506
|
-
|
|
554
|
+
var e;
|
|
555
|
+
super(), this.unsubscribe = [], this.amount = "", this.tokenSymbol = "", this.networkName = "", this.exchanges = l.state.exchanges, this.isLoading = l.state.isLoading, this.loadingExchangeId = null, this.connectedWalletInfo = (e = p.getAccountData()) == null ? void 0 : e.connectedWalletInfo, this.initializePaymentDetails(), this.unsubscribe.push(l.subscribeKey("exchanges", (s) => this.exchanges = s)), this.unsubscribe.push(l.subscribeKey("isLoading", (s) => this.isLoading = s)), this.unsubscribe.push(p.subscribeChainProp("accountState", (s) => {
|
|
556
|
+
this.connectedWalletInfo = s == null ? void 0 : s.connectedWalletInfo;
|
|
557
|
+
})), l.fetchExchanges();
|
|
507
558
|
}
|
|
508
559
|
get isWalletConnected() {
|
|
509
|
-
|
|
560
|
+
const e = p.getAccountData();
|
|
561
|
+
return (e == null ? void 0 : e.status) === "connected";
|
|
510
562
|
}
|
|
511
563
|
render() {
|
|
512
|
-
return
|
|
564
|
+
return m`
|
|
513
565
|
<wui-flex flexDirection="column">
|
|
514
|
-
<wui-flex flexDirection="column" .padding=${["0", "
|
|
566
|
+
<wui-flex flexDirection="column" .padding=${["0", "4", "4", "4"]} gap="3">
|
|
515
567
|
${this.renderPaymentHeader()}
|
|
516
568
|
|
|
517
|
-
<wui-flex flexDirection="column" gap="
|
|
569
|
+
<wui-flex flexDirection="column" gap="3">
|
|
518
570
|
${this.renderPayWithWallet()} ${this.renderExchangeOptions()}
|
|
519
571
|
</wui-flex>
|
|
520
572
|
</wui-flex>
|
|
@@ -526,27 +578,29 @@ let m = class extends G {
|
|
|
526
578
|
this.networkName = e.network, this.tokenSymbol = e.metadata.symbol, this.amount = l.state.amount.toString();
|
|
527
579
|
}
|
|
528
580
|
renderPayWithWallet() {
|
|
529
|
-
return
|
|
581
|
+
return ie(this.networkName) ? m`<wui-flex flexDirection="column" gap="3">
|
|
530
582
|
${this.isWalletConnected ? this.renderConnectedView() : this.renderDisconnectedView()}
|
|
531
583
|
</wui-flex>
|
|
532
|
-
<wui-separator text="or"></wui-separator>` :
|
|
584
|
+
<wui-separator text="or"></wui-separator>` : m``;
|
|
533
585
|
}
|
|
534
586
|
renderPaymentHeader() {
|
|
535
587
|
let e = this.networkName;
|
|
536
588
|
if (this.networkName) {
|
|
537
|
-
const a =
|
|
589
|
+
const a = p.getAllRequestedCaipNetworks().find((r) => r.caipNetworkId === this.networkName);
|
|
538
590
|
a && (e = a.name);
|
|
539
591
|
}
|
|
540
|
-
return
|
|
592
|
+
return m`
|
|
541
593
|
<wui-flex flexDirection="column" alignItems="center">
|
|
542
|
-
<wui-flex alignItems="center" gap="
|
|
543
|
-
<wui-text variant="
|
|
544
|
-
<wui-flex class="token-display" alignItems="center" gap="
|
|
545
|
-
<wui-text variant="
|
|
594
|
+
<wui-flex alignItems="center" gap="2">
|
|
595
|
+
<wui-text variant="h1-regular" color="primary">${this.amount || "0.0000"}</wui-text>
|
|
596
|
+
<wui-flex class="token-display" alignItems="center" gap="1">
|
|
597
|
+
<wui-text variant="md-medium" color="primary">
|
|
546
598
|
${this.tokenSymbol || "Unknown Asset"}
|
|
547
599
|
</wui-text>
|
|
548
|
-
${e ?
|
|
549
|
-
<wui-text variant="
|
|
600
|
+
${e ? m`
|
|
601
|
+
<wui-text variant="sm-medium" color="secondary">
|
|
602
|
+
on ${e}
|
|
603
|
+
</wui-text>
|
|
550
604
|
` : ""}
|
|
551
605
|
</wui-flex>
|
|
552
606
|
</wui-flex>
|
|
@@ -554,68 +608,62 @@ let m = class extends G {
|
|
|
554
608
|
`;
|
|
555
609
|
}
|
|
556
610
|
renderConnectedView() {
|
|
557
|
-
var s, a
|
|
611
|
+
var s, a;
|
|
558
612
|
const e = ((s = this.connectedWalletInfo) == null ? void 0 : s.name) || "connected wallet";
|
|
559
|
-
return
|
|
613
|
+
return m`
|
|
560
614
|
<wui-list-item
|
|
561
615
|
@click=${this.onWalletPayment}
|
|
562
616
|
?chevron=${!0}
|
|
617
|
+
?fullSize=${!0}
|
|
618
|
+
?rounded=${!0}
|
|
563
619
|
data-testid="wallet-payment-option"
|
|
620
|
+
imageSrc=${Y((a = this.connectedWalletInfo) == null ? void 0 : a.icon)}
|
|
564
621
|
>
|
|
565
|
-
<wui-
|
|
566
|
-
<wui-wallet-image
|
|
567
|
-
size="sm"
|
|
568
|
-
imageSrc=${C((a = this.connectedWalletInfo) == null ? void 0 : a.icon)}
|
|
569
|
-
name=${C((r = this.connectedWalletInfo) == null ? void 0 : r.name)}
|
|
570
|
-
></wui-wallet-image>
|
|
571
|
-
<wui-text variant="paragraph-500" color="inherit">Pay with ${e}</wui-text>
|
|
572
|
-
</wui-flex>
|
|
622
|
+
<wui-text variant="lg-regular" color="primary">Pay with ${e}</wui-text>
|
|
573
623
|
</wui-list-item>
|
|
574
624
|
|
|
575
625
|
<wui-list-item
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
626
|
+
icon="power"
|
|
627
|
+
?rounded=${!0}
|
|
628
|
+
iconColor="error"
|
|
579
629
|
@click=${this.onDisconnect}
|
|
580
630
|
data-testid="disconnect-button"
|
|
581
631
|
?chevron=${!1}
|
|
582
632
|
>
|
|
583
|
-
<wui-text variant="
|
|
633
|
+
<wui-text variant="lg-regular" color="secondary">Disconnect</wui-text>
|
|
584
634
|
</wui-list-item>
|
|
585
635
|
`;
|
|
586
636
|
}
|
|
587
637
|
renderDisconnectedView() {
|
|
588
|
-
return
|
|
638
|
+
return m`<wui-list-item
|
|
589
639
|
variant="icon"
|
|
590
640
|
iconVariant="overlay"
|
|
591
|
-
icon="
|
|
641
|
+
icon="wallet"
|
|
642
|
+
?rounded=${!0}
|
|
592
643
|
@click=${this.onWalletPayment}
|
|
593
644
|
?chevron=${!0}
|
|
594
645
|
data-testid="wallet-payment-option"
|
|
595
646
|
>
|
|
596
|
-
<wui-text variant="
|
|
647
|
+
<wui-text variant="lg-regular" color="primary">Pay from wallet</wui-text>
|
|
597
648
|
</wui-list-item>`;
|
|
598
649
|
}
|
|
599
650
|
renderExchangeOptions() {
|
|
600
|
-
return this.isLoading ?
|
|
651
|
+
return this.isLoading ? m`<wui-flex justifyContent="center" alignItems="center">
|
|
601
652
|
<wui-spinner size="md"></wui-spinner>
|
|
602
|
-
</wui-flex>` : this.exchanges.length === 0 ?
|
|
603
|
-
<wui-text variant="
|
|
604
|
-
</wui-flex>` : this.exchanges.map((e) =>
|
|
653
|
+
</wui-flex>` : this.exchanges.length === 0 ? m`<wui-flex justifyContent="center" alignItems="center">
|
|
654
|
+
<wui-text variant="md-medium" color="primary">No exchanges available</wui-text>
|
|
655
|
+
</wui-flex>` : this.exchanges.map((e) => m`
|
|
605
656
|
<wui-list-item
|
|
606
657
|
@click=${() => this.onExchangePayment(e.id)}
|
|
607
658
|
data-testid="exchange-option-${e.id}"
|
|
608
659
|
?chevron=${!0}
|
|
609
660
|
?disabled=${this.loadingExchangeId !== null}
|
|
661
|
+
?loading=${this.loadingExchangeId === e.id}
|
|
662
|
+
imageSrc=${Y(e.imageUrl)}
|
|
610
663
|
>
|
|
611
|
-
<wui-flex alignItems="center" gap="
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
imageSrc=${C(e.imageUrl)}
|
|
615
|
-
name=${e.name}
|
|
616
|
-
></wui-wallet-image>`}
|
|
617
|
-
<wui-text flexGrow="1" variant="paragraph-500" color="inherit"
|
|
618
|
-
>Pay with ${e.name} <wui-spinner size="sm" color="fg-200"></wui-spinner
|
|
664
|
+
<wui-flex alignItems="center" gap="3">
|
|
665
|
+
<wui-text flexGrow="1" variant="md-medium" color="primary"
|
|
666
|
+
>Pay with ${e.name} <wui-spinner size="sm" color="secondary"></wui-spinner
|
|
619
667
|
></wui-text>
|
|
620
668
|
</wui-flex>
|
|
621
669
|
</wui-list-item>
|
|
@@ -628,11 +676,11 @@ let m = class extends G {
|
|
|
628
676
|
try {
|
|
629
677
|
this.loadingExchangeId = e;
|
|
630
678
|
const s = await l.handlePayWithExchange(e);
|
|
631
|
-
s && (await
|
|
679
|
+
s && (await x.open({
|
|
632
680
|
view: "PayLoading"
|
|
633
|
-
}),
|
|
681
|
+
}), C.openHref(s.url, s.openInNewTab ? "_blank" : "_self"));
|
|
634
682
|
} catch (s) {
|
|
635
|
-
console.error("Failed to pay with exchange", s),
|
|
683
|
+
console.error("Failed to pay with exchange", s), T.showError("Failed to pay with exchange");
|
|
636
684
|
} finally {
|
|
637
685
|
this.loadingExchangeId = null;
|
|
638
686
|
}
|
|
@@ -640,55 +688,63 @@ let m = class extends G {
|
|
|
640
688
|
async onDisconnect(e) {
|
|
641
689
|
e.stopPropagation();
|
|
642
690
|
try {
|
|
643
|
-
await
|
|
691
|
+
await w.disconnect();
|
|
644
692
|
} catch {
|
|
645
|
-
console.error("Failed to disconnect"),
|
|
693
|
+
console.error("Failed to disconnect"), T.showError("Failed to disconnect");
|
|
646
694
|
}
|
|
647
695
|
}
|
|
648
696
|
disconnectedCallback() {
|
|
649
697
|
this.unsubscribe.forEach((e) => e());
|
|
650
698
|
}
|
|
651
699
|
};
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
],
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
],
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
],
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
],
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
],
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
],
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
],
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
],
|
|
677
|
-
const
|
|
700
|
+
y.styles = de;
|
|
701
|
+
E([
|
|
702
|
+
h()
|
|
703
|
+
], y.prototype, "amount", void 0);
|
|
704
|
+
E([
|
|
705
|
+
h()
|
|
706
|
+
], y.prototype, "tokenSymbol", void 0);
|
|
707
|
+
E([
|
|
708
|
+
h()
|
|
709
|
+
], y.prototype, "networkName", void 0);
|
|
710
|
+
E([
|
|
711
|
+
h()
|
|
712
|
+
], y.prototype, "exchanges", void 0);
|
|
713
|
+
E([
|
|
714
|
+
h()
|
|
715
|
+
], y.prototype, "isLoading", void 0);
|
|
716
|
+
E([
|
|
717
|
+
h()
|
|
718
|
+
], y.prototype, "loadingExchangeId", void 0);
|
|
719
|
+
E([
|
|
720
|
+
h()
|
|
721
|
+
], y.prototype, "connectedWalletInfo", void 0);
|
|
722
|
+
y = E([
|
|
723
|
+
H("w3m-pay-view")
|
|
724
|
+
], y);
|
|
725
|
+
const pe = F`
|
|
678
726
|
:host {
|
|
679
727
|
display: block;
|
|
680
728
|
height: 100%;
|
|
681
729
|
width: 100%;
|
|
682
730
|
}
|
|
731
|
+
|
|
732
|
+
wui-flex:first-child:not(:only-child) {
|
|
733
|
+
position: relative;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
wui-loading-thumbnail {
|
|
737
|
+
position: absolute;
|
|
738
|
+
}
|
|
683
739
|
`;
|
|
684
|
-
var
|
|
740
|
+
var U = function(t, e, s, a) {
|
|
685
741
|
var r = arguments.length, i = r < 3 ? e : a === null ? a = Object.getOwnPropertyDescriptor(e, s) : a, u;
|
|
686
742
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(t, e, s, a);
|
|
687
|
-
else for (var
|
|
743
|
+
else for (var d = t.length - 1; d >= 0; d--) (u = t[d]) && (i = (r < 3 ? u(i) : r > 3 ? u(e, s, i) : u(e, s)) || i);
|
|
688
744
|
return r > 3 && i && Object.defineProperty(e, s, i), i;
|
|
689
745
|
};
|
|
690
|
-
const
|
|
691
|
-
let
|
|
746
|
+
const me = 4e3;
|
|
747
|
+
let I = class extends W {
|
|
692
748
|
constructor() {
|
|
693
749
|
super(), this.loadingMessage = "", this.subMessage = "", this.paymentState = "in-progress", this.paymentState = l.state.isPaymentInProgress ? "in-progress" : "completed", this.updateMessages(), this.setupSubscription(), this.setupExchangeSubscription();
|
|
694
750
|
}
|
|
@@ -696,19 +752,19 @@ let N = class extends G {
|
|
|
696
752
|
clearInterval(this.exchangeSubscription);
|
|
697
753
|
}
|
|
698
754
|
render() {
|
|
699
|
-
return
|
|
755
|
+
return m`
|
|
700
756
|
<wui-flex
|
|
701
757
|
flexDirection="column"
|
|
702
758
|
alignItems="center"
|
|
703
|
-
.padding=${["
|
|
704
|
-
gap="
|
|
759
|
+
.padding=${["7", "5", "5", "5"]}
|
|
760
|
+
gap="9"
|
|
705
761
|
>
|
|
706
762
|
<wui-flex justifyContent="center" alignItems="center"> ${this.getStateIcon()} </wui-flex>
|
|
707
|
-
<wui-flex flexDirection="column" alignItems="center" gap="
|
|
708
|
-
<wui-text align="center" variant="
|
|
763
|
+
<wui-flex flexDirection="column" alignItems="center" gap="2">
|
|
764
|
+
<wui-text align="center" variant="lg-medium" color="primary">
|
|
709
765
|
${this.loadingMessage}
|
|
710
766
|
</wui-text>
|
|
711
|
-
<wui-text align="center" variant="
|
|
767
|
+
<wui-text align="center" variant="lg-regular" color="secondary">
|
|
712
768
|
${this.subMessage}
|
|
713
769
|
</wui-text>
|
|
714
770
|
</wui-flex>
|
|
@@ -747,59 +803,148 @@ let N = class extends G {
|
|
|
747
803
|
var r, i, u;
|
|
748
804
|
const s = (r = l.state.currentPayment) == null ? void 0 : r.exchangeId, a = (i = l.state.currentPayment) == null ? void 0 : i.sessionId;
|
|
749
805
|
s && a && (await l.updateBuyStatus(s, a), ((u = l.state.currentPayment) == null ? void 0 : u.status) === "SUCCESS" && clearInterval(this.exchangeSubscription));
|
|
750
|
-
},
|
|
806
|
+
}, me));
|
|
751
807
|
}
|
|
752
808
|
setupSubscription() {
|
|
753
809
|
l.subscribeKey("isPaymentInProgress", (e) => {
|
|
754
810
|
var s;
|
|
755
811
|
!e && this.paymentState === "in-progress" && (l.state.error || !((s = l.state.currentPayment) != null && s.result) ? this.paymentState = "error" : this.paymentState = "completed", this.updateMessages(), setTimeout(() => {
|
|
756
|
-
|
|
812
|
+
w.state.status !== "disconnected" && x.close();
|
|
757
813
|
}, 3e3));
|
|
758
814
|
}), l.subscribeKey("error", (e) => {
|
|
759
815
|
e && this.paymentState === "in-progress" && (this.paymentState = "error", this.updateMessages());
|
|
760
816
|
});
|
|
761
817
|
}
|
|
762
818
|
loaderTemplate() {
|
|
763
|
-
const e =
|
|
764
|
-
return
|
|
819
|
+
const e = J.state.themeVariables["--w3m-border-radius-master"], s = e ? parseInt(e.replace("px", ""), 10) : 4, a = this.getPaymentIcon();
|
|
820
|
+
return m`
|
|
821
|
+
<wui-flex justifyContent="center" alignItems="center" style="position: relative;">
|
|
822
|
+
${a ? m`<wui-wallet-image size="lg" imageSrc=${a}></wui-wallet-image>` : null}
|
|
823
|
+
<wui-loading-thumbnail radius=${s * 9}></wui-loading-thumbnail>
|
|
824
|
+
</wui-flex>
|
|
825
|
+
`;
|
|
826
|
+
}
|
|
827
|
+
getPaymentIcon() {
|
|
828
|
+
var s, a;
|
|
829
|
+
const e = l.state.currentPayment;
|
|
830
|
+
if (e) {
|
|
831
|
+
if (e.type === "exchange") {
|
|
832
|
+
const r = e.exchangeId;
|
|
833
|
+
if (r) {
|
|
834
|
+
const i = l.getExchangeById(r);
|
|
835
|
+
return i == null ? void 0 : i.imageUrl;
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
if (e.type === "wallet") {
|
|
839
|
+
const r = (a = (s = p.getAccountData()) == null ? void 0 : s.connectedWalletInfo) == null ? void 0 : a.icon;
|
|
840
|
+
if (r)
|
|
841
|
+
return r;
|
|
842
|
+
const i = p.state.activeChain;
|
|
843
|
+
if (!i)
|
|
844
|
+
return;
|
|
845
|
+
const u = M.getConnectorId(i);
|
|
846
|
+
if (!u)
|
|
847
|
+
return;
|
|
848
|
+
const d = M.getConnectorById(u);
|
|
849
|
+
return d ? Z.getConnectorImage(d) : void 0;
|
|
850
|
+
}
|
|
851
|
+
}
|
|
765
852
|
}
|
|
766
853
|
successTemplate() {
|
|
767
|
-
return
|
|
854
|
+
return m`<wui-icon size="xl" color="success" name="checkmark"></wui-icon>`;
|
|
768
855
|
}
|
|
769
856
|
errorTemplate() {
|
|
770
|
-
return
|
|
857
|
+
return m`<wui-icon size="xl" color="error" name="close"></wui-icon>`;
|
|
771
858
|
}
|
|
772
859
|
};
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
],
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
],
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
],
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
],
|
|
786
|
-
|
|
860
|
+
I.styles = pe;
|
|
861
|
+
U([
|
|
862
|
+
h()
|
|
863
|
+
], I.prototype, "loadingMessage", void 0);
|
|
864
|
+
U([
|
|
865
|
+
h()
|
|
866
|
+
], I.prototype, "subMessage", void 0);
|
|
867
|
+
U([
|
|
868
|
+
h()
|
|
869
|
+
], I.prototype, "paymentState", void 0);
|
|
870
|
+
I = U([
|
|
871
|
+
H("w3m-pay-loading-view")
|
|
872
|
+
], I);
|
|
873
|
+
const ye = 3e5;
|
|
874
|
+
async function he(t) {
|
|
787
875
|
return l.handleOpenPay(t);
|
|
788
876
|
}
|
|
789
|
-
function
|
|
877
|
+
async function Re(t, e = ye) {
|
|
878
|
+
if (e <= 0)
|
|
879
|
+
throw new c(o.INVALID_PAYMENT_CONFIG, "Timeout must be greater than 0");
|
|
880
|
+
try {
|
|
881
|
+
await he(t);
|
|
882
|
+
} catch (s) {
|
|
883
|
+
throw s instanceof c ? s : new c(o.UNABLE_TO_INITIATE_PAYMENT, s.message);
|
|
884
|
+
}
|
|
885
|
+
return new Promise((s, a) => {
|
|
886
|
+
let r = !1;
|
|
887
|
+
const i = setTimeout(() => {
|
|
888
|
+
r || (r = !0, S(), a(new c(o.GENERIC_PAYMENT_ERROR, "Payment timeout")));
|
|
889
|
+
}, e);
|
|
890
|
+
function u() {
|
|
891
|
+
if (r)
|
|
892
|
+
return;
|
|
893
|
+
const f = l.state.currentPayment, k = l.state.error, K = l.state.isPaymentInProgress;
|
|
894
|
+
if ((f == null ? void 0 : f.status) === "SUCCESS") {
|
|
895
|
+
r = !0, S(), clearTimeout(i), s({
|
|
896
|
+
success: !0,
|
|
897
|
+
result: f.result
|
|
898
|
+
});
|
|
899
|
+
return;
|
|
900
|
+
}
|
|
901
|
+
if ((f == null ? void 0 : f.status) === "FAILED") {
|
|
902
|
+
r = !0, S(), clearTimeout(i), s({
|
|
903
|
+
success: !1,
|
|
904
|
+
error: k || "Payment failed"
|
|
905
|
+
});
|
|
906
|
+
return;
|
|
907
|
+
}
|
|
908
|
+
k && !K && !f && (r = !0, S(), clearTimeout(i), s({
|
|
909
|
+
success: !1,
|
|
910
|
+
error: k
|
|
911
|
+
}));
|
|
912
|
+
}
|
|
913
|
+
const d = D("currentPayment", u), A = D("error", u), P = D("isPaymentInProgress", u), S = we([
|
|
914
|
+
d,
|
|
915
|
+
A,
|
|
916
|
+
P
|
|
917
|
+
]);
|
|
918
|
+
u();
|
|
919
|
+
});
|
|
920
|
+
}
|
|
921
|
+
function ve() {
|
|
790
922
|
return l.getExchanges();
|
|
791
923
|
}
|
|
792
|
-
function
|
|
924
|
+
function De() {
|
|
793
925
|
var t;
|
|
794
926
|
return (t = l.state.currentPayment) == null ? void 0 : t.result;
|
|
795
927
|
}
|
|
796
|
-
function
|
|
928
|
+
function Oe() {
|
|
797
929
|
return l.state.error;
|
|
798
930
|
}
|
|
799
|
-
function
|
|
931
|
+
function Le() {
|
|
800
932
|
return l.state.isPaymentInProgress;
|
|
801
933
|
}
|
|
802
|
-
|
|
934
|
+
function D(t, e) {
|
|
935
|
+
return l.subscribeKey(t, e);
|
|
936
|
+
}
|
|
937
|
+
function we(t) {
|
|
938
|
+
return () => {
|
|
939
|
+
t.forEach((e) => {
|
|
940
|
+
try {
|
|
941
|
+
e();
|
|
942
|
+
} catch {
|
|
943
|
+
}
|
|
944
|
+
});
|
|
945
|
+
};
|
|
946
|
+
}
|
|
947
|
+
const Me = {
|
|
803
948
|
network: "eip155:8453",
|
|
804
949
|
asset: "native",
|
|
805
950
|
metadata: {
|
|
@@ -807,7 +952,7 @@ const _e = {
|
|
|
807
952
|
symbol: "ETH",
|
|
808
953
|
decimals: 18
|
|
809
954
|
}
|
|
810
|
-
},
|
|
955
|
+
}, Ye = {
|
|
811
956
|
network: "eip155:8453",
|
|
812
957
|
asset: "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
|
|
813
958
|
metadata: {
|
|
@@ -815,7 +960,7 @@ const _e = {
|
|
|
815
960
|
symbol: "USDC",
|
|
816
961
|
decimals: 6
|
|
817
962
|
}
|
|
818
|
-
},
|
|
963
|
+
}, Ge = {
|
|
819
964
|
network: "eip155:84532",
|
|
820
965
|
asset: "native",
|
|
821
966
|
metadata: {
|
|
@@ -823,16 +968,116 @@ const _e = {
|
|
|
823
968
|
symbol: "ETH",
|
|
824
969
|
decimals: 18
|
|
825
970
|
}
|
|
971
|
+
}, Ve = {
|
|
972
|
+
network: "eip155:1",
|
|
973
|
+
asset: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
974
|
+
metadata: {
|
|
975
|
+
name: "USD Coin",
|
|
976
|
+
symbol: "USDC",
|
|
977
|
+
decimals: 6
|
|
978
|
+
}
|
|
979
|
+
}, $e = {
|
|
980
|
+
network: "eip155:10",
|
|
981
|
+
asset: "0x0b2c639c533813f4aa9d7837caf62653d097ff85",
|
|
982
|
+
metadata: {
|
|
983
|
+
name: "USD Coin",
|
|
984
|
+
symbol: "USDC",
|
|
985
|
+
decimals: 6
|
|
986
|
+
}
|
|
987
|
+
}, Be = {
|
|
988
|
+
network: "eip155:42161",
|
|
989
|
+
asset: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
|
|
990
|
+
metadata: {
|
|
991
|
+
name: "USD Coin",
|
|
992
|
+
symbol: "USDC",
|
|
993
|
+
decimals: 6
|
|
994
|
+
}
|
|
995
|
+
}, Fe = {
|
|
996
|
+
network: "eip155:137",
|
|
997
|
+
asset: "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
|
|
998
|
+
metadata: {
|
|
999
|
+
name: "USD Coin",
|
|
1000
|
+
symbol: "USDC",
|
|
1001
|
+
decimals: 6
|
|
1002
|
+
}
|
|
1003
|
+
}, We = {
|
|
1004
|
+
network: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
|
|
1005
|
+
asset: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
|
|
1006
|
+
metadata: {
|
|
1007
|
+
name: "USD Coin",
|
|
1008
|
+
symbol: "USDC",
|
|
1009
|
+
decimals: 6
|
|
1010
|
+
}
|
|
1011
|
+
}, He = {
|
|
1012
|
+
network: "eip155:1",
|
|
1013
|
+
asset: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
|
|
1014
|
+
metadata: {
|
|
1015
|
+
name: "Tether USD",
|
|
1016
|
+
symbol: "USDT",
|
|
1017
|
+
decimals: 6
|
|
1018
|
+
}
|
|
1019
|
+
}, Ke = {
|
|
1020
|
+
network: "eip155:10",
|
|
1021
|
+
asset: "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",
|
|
1022
|
+
metadata: {
|
|
1023
|
+
name: "Tether USD",
|
|
1024
|
+
symbol: "USDT",
|
|
1025
|
+
decimals: 6
|
|
1026
|
+
}
|
|
1027
|
+
}, je = {
|
|
1028
|
+
network: "eip155:42161",
|
|
1029
|
+
asset: "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",
|
|
1030
|
+
metadata: {
|
|
1031
|
+
name: "Tether USD",
|
|
1032
|
+
symbol: "USDT",
|
|
1033
|
+
decimals: 6
|
|
1034
|
+
}
|
|
1035
|
+
}, qe = {
|
|
1036
|
+
network: "eip155:137",
|
|
1037
|
+
asset: "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
|
|
1038
|
+
metadata: {
|
|
1039
|
+
name: "Tether USD",
|
|
1040
|
+
symbol: "USDT",
|
|
1041
|
+
decimals: 6
|
|
1042
|
+
}
|
|
1043
|
+
}, ze = {
|
|
1044
|
+
network: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
|
|
1045
|
+
asset: "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
|
|
1046
|
+
metadata: {
|
|
1047
|
+
name: "Tether USD",
|
|
1048
|
+
symbol: "USDT",
|
|
1049
|
+
decimals: 6
|
|
1050
|
+
}
|
|
1051
|
+
}, Xe = {
|
|
1052
|
+
network: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
|
|
1053
|
+
asset: "native",
|
|
1054
|
+
metadata: {
|
|
1055
|
+
name: "Solana",
|
|
1056
|
+
symbol: "SOL",
|
|
1057
|
+
decimals: 9
|
|
1058
|
+
}
|
|
826
1059
|
};
|
|
827
1060
|
export {
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
1061
|
+
I as W3mPayLoadingView,
|
|
1062
|
+
y as W3mPayView,
|
|
1063
|
+
Be as arbitrumUSDC,
|
|
1064
|
+
je as arbitrumUSDT,
|
|
1065
|
+
Me as baseETH,
|
|
1066
|
+
Ge as baseSepoliaETH,
|
|
1067
|
+
Ye as baseUSDC,
|
|
1068
|
+
Ve as ethereumUSDC,
|
|
1069
|
+
He as ethereumUSDT,
|
|
1070
|
+
ve as getExchanges,
|
|
1071
|
+
Le as getIsPaymentInProgress,
|
|
1072
|
+
Oe as getPayError,
|
|
1073
|
+
De as getPayResult,
|
|
1074
|
+
he as openPay,
|
|
1075
|
+
$e as optimismUSDC,
|
|
1076
|
+
Ke as optimismUSDT,
|
|
1077
|
+
Re as pay,
|
|
1078
|
+
Fe as polygonUSDC,
|
|
1079
|
+
qe as polygonUSDT,
|
|
1080
|
+
Xe as solanaSOL,
|
|
1081
|
+
We as solanaUSDC,
|
|
1082
|
+
ze as solanaUSDT
|
|
838
1083
|
};
|