@paywithglide/glide-react 0.0.38 → 0.0.39

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.
@@ -109,6 +109,7 @@ export type GlideDepositOptions = {
109
109
  excludeCurrencyTiers?: ("tier1" | "tier2" | "tier3")[];
110
110
  excludeFundingSources?: FundingSource[];
111
111
  fundingSources?: FundingSource[];
112
+ allowedPaymentCurrencies?: string[];
112
113
  walletProvider?: GlideDepositWalletProvider;
113
114
  localStorageProvider?: GlideLocalStorageProvider;
114
115
  onOpen?: () => void;
package/dist/glide.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var _ = Object.defineProperty;
2
2
  var ee = (s, t, e) => t in s ? _(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
- var A = (s, t, e) => ee(s, typeof t != "symbol" ? t + "" : t, e);
4
- import { useMemo as M } from "react";
3
+ var C = (s, t, e) => ee(s, typeof t != "symbol" ? t + "" : t, e);
4
+ import { useMemo as A } from "react";
5
5
  function te(s, { strict: t = !0 } = {}) {
6
6
  return !s || typeof s != "string" ? !1 : t ? /^0x[0-9a-fA-F]*$/.test(s) : s.startsWith("0x");
7
7
  }
@@ -15,11 +15,11 @@ let T = {
15
15
  };
16
16
  class I extends Error {
17
17
  constructor(t, e = {}) {
18
- var a;
18
+ var c;
19
19
  const i = (() => {
20
- var n;
21
- return e.cause instanceof I ? e.cause.details : (n = e.cause) != null && n.message ? e.cause.message : e.details;
22
- })(), o = e.cause instanceof I && e.cause.docsPath || e.docsPath, r = (a = T.getDocsUrl) == null ? void 0 : a.call(T, { ...e, docsPath: o }), c = [
20
+ var a;
21
+ return e.cause instanceof I ? e.cause.details : (a = e.cause) != null && a.message ? e.cause.message : e.details;
22
+ })(), o = e.cause instanceof I && e.cause.docsPath || e.docsPath, r = (c = T.getDocsUrl) == null ? void 0 : c.call(T, { ...e, docsPath: o }), n = [
23
23
  t || "An error occurred.",
24
24
  "",
25
25
  ...e.metaMessages ? [...e.metaMessages, ""] : [],
@@ -28,7 +28,7 @@ class I extends Error {
28
28
  ...T.version ? [`Version: ${T.version}`] : []
29
29
  ].join(`
30
30
  `);
31
- super(c, e.cause ? { cause: e.cause } : void 0), Object.defineProperty(this, "details", {
31
+ super(n, e.cause ? { cause: e.cause } : void 0), Object.defineProperty(this, "details", {
32
32
  enumerable: !0,
33
33
  configurable: !0,
34
34
  writable: !0,
@@ -72,7 +72,7 @@ class V extends I {
72
72
  super(`${i.charAt(0).toUpperCase()}${i.slice(1).toLowerCase()} size (${t}) exceeds padding size (${e}).`, { name: "SizeExceedsPaddingSizeError" });
73
73
  }
74
74
  }
75
- function C(s, { dir: t, size: e = 32 } = {}) {
75
+ function D(s, { dir: t, size: e = 32 } = {}) {
76
76
  return typeof s == "string" ? se(s, { dir: t, size: e }) : ie(s, { dir: t, size: e });
77
77
  }
78
78
  function se(s, { dir: t, size: e = 32 } = {}) {
@@ -126,42 +126,42 @@ function ae(s, t = {}) {
126
126
  }
127
127
  function ce(s, t = {}) {
128
128
  const e = `0x${Number(s)}`;
129
- return typeof t.size == "number" ? (q(e, { size: t.size }), C(e, { size: t.size })) : e;
129
+ return typeof t.size == "number" ? (q(e, { size: t.size }), D(e, { size: t.size })) : e;
130
130
  }
131
131
  function J(s, t = {}) {
132
132
  let e = "";
133
133
  for (let o = 0; o < s.length; o++)
134
134
  e += ne[s[o]];
135
135
  const i = `0x${e}`;
136
- return typeof t.size == "number" ? (q(i, { size: t.size }), C(i, { dir: "right", size: t.size })) : i;
136
+ return typeof t.size == "number" ? (q(i, { size: t.size }), D(i, { dir: "right", size: t.size })) : i;
137
137
  }
138
138
  function de(s, t = {}) {
139
139
  const { signed: e, size: i } = t, o = BigInt(s);
140
140
  let r;
141
141
  i ? e ? r = (1n << BigInt(i) * 8n - 1n) - 1n : r = 2n ** (BigInt(i) * 8n) - 1n : typeof s == "number" && (r = BigInt(Number.MAX_SAFE_INTEGER));
142
- const c = typeof r == "bigint" && e ? -r - 1n : 0;
143
- if (r && o > r || o < c) {
144
- const n = typeof s == "bigint" ? "n" : "";
142
+ const n = typeof r == "bigint" && e ? -r - 1n : 0;
143
+ if (r && o > r || o < n) {
144
+ const a = typeof s == "bigint" ? "n" : "";
145
145
  throw new oe({
146
- max: r ? `${r}${n}` : void 0,
147
- min: `${c}${n}`,
146
+ max: r ? `${r}${a}` : void 0,
147
+ min: `${n}${a}`,
148
148
  signed: e,
149
149
  size: i,
150
- value: `${s}${n}`
150
+ value: `${s}${a}`
151
151
  });
152
152
  }
153
- const a = `0x${(e && o < 0 ? (1n << BigInt(i * 8)) + BigInt(o) : o).toString(16)}`;
154
- return i ? C(a, { size: i }) : a;
153
+ const c = `0x${(e && o < 0 ? (1n << BigInt(i * 8)) + BigInt(o) : o).toString(16)}`;
154
+ return i ? D(c, { size: i }) : c;
155
155
  }
156
156
  const le = /* @__PURE__ */ new TextEncoder();
157
157
  function pe(s, t = {}) {
158
158
  const e = le.encode(s);
159
159
  return J(e, t);
160
160
  }
161
- class D {
161
+ class M {
162
162
  constructor(t) {
163
- A(this, "opts");
164
- A(this, "open", () => {
163
+ C(this, "opts");
164
+ C(this, "open", () => {
165
165
  if (!(!this.opts.container && document.body.classList.contains("glide-deposit-open"))) {
166
166
  if (this.opts.container || document.body.classList.add("glide-deposit-open"), (this.opts.mode === "deposit" || this.opts.mode === "buy") && !this.opts.recipient)
167
167
  throw new Error("recipient is required for deposit/buy mode");
@@ -172,13 +172,13 @@ class D {
172
172
  this.openUrl(`${this.baseUrl}${this.opts.app}?init=true&embed=true`), this.initialize();
173
173
  }
174
174
  });
175
- A(this, "iframeEventHandler", async (t) => {
176
- var i, o, r, c, a, n, h, u, m, g, f, y, w, l, b, d, v, $, x, P, E, k, U, z, S, j, G, W, B, H, O, L, R;
175
+ C(this, "iframeEventHandler", async (t) => {
176
+ var i, o, r, n, c, a, h, u, m, g, f, y, w, l, b, d, v, $, S, x, E, k, U, z, P, j, G, W, B, H, O, L, R;
177
177
  const e = t.data;
178
178
  switch (e.type) {
179
179
  case "sendInit": {
180
- const p = this.opts.recipient, X = (i = this.opts.walletProvider) == null ? void 0 : i.address, Q = (o = this.opts.walletProvider) == null ? void 0 : o.availableChainIds, Y = (r = this.opts.walletProvider) == null ? void 0 : r.currentChainId, Z = this.opts.preferGaslessPayment || !!((c = this.opts.walletProvider) != null && c.signTypedDataAsync);
181
- (h = (a = this.iframe) == null ? void 0 : a.contentWindow) == null || h.postMessage(
180
+ const p = this.opts.recipient, X = (i = this.opts.walletProvider) == null ? void 0 : i.address, Q = (o = this.opts.walletProvider) == null ? void 0 : o.availableChainIds, Y = (r = this.opts.walletProvider) == null ? void 0 : r.currentChainId, Z = this.opts.preferGaslessPayment || !!((n = this.opts.walletProvider) != null && n.signTypedDataAsync);
181
+ (h = (c = this.iframe) == null ? void 0 : c.contentWindow) == null || h.postMessage(
182
182
  {
183
183
  type: "initialize",
184
184
  sessionId: this.opts.sessionId,
@@ -192,6 +192,7 @@ class D {
192
192
  excludeCurrencyTiers: this.opts.excludeCurrencyTiers,
193
193
  excludeFundingSources: this.opts.excludeFundingSources,
194
194
  fundingSources: this.opts.fundingSources,
195
+ allowedPaymentCurrencies: this.opts.allowedPaymentCurrencies,
195
196
  mode: this.opts.mode,
196
197
  amount: this.opts.amount,
197
198
  chainId: this.opts.chainId,
@@ -204,7 +205,7 @@ class D {
204
205
  hideSettlementCopy: this.opts.hideSettlementCopy,
205
206
  theme: {
206
207
  ...this.opts.theme || {},
207
- colorScheme: ((n = this.opts.theme) == null ? void 0 : n.colorScheme) || getComputedStyle(document.documentElement).colorScheme || ""
208
+ colorScheme: ((a = this.opts.theme) == null ? void 0 : a.colorScheme) || getComputedStyle(document.documentElement).colorScheme || ""
208
209
  },
209
210
  didProvideLocalStorage: !!this.opts.localStorageProvider,
210
211
  debug: this.opts.debug,
@@ -266,7 +267,7 @@ class D {
266
267
  this.removeIframe(), this.destroy(), (v = (d = this.opts) == null ? void 0 : d.onClose) == null || v.call(d);
267
268
  break;
268
269
  case "setMode":
269
- (x = ($ = this.opts) == null ? void 0 : $.onSetMode) == null || x.call($, e.mode);
270
+ (S = ($ = this.opts) == null ? void 0 : $.onSetMode) == null || S.call($, e.mode);
270
271
  break;
271
272
  case "switchChain":
272
273
  if (!this.opts.walletProvider)
@@ -274,7 +275,7 @@ class D {
274
275
  try {
275
276
  await this.opts.walletProvider.switchChainAsync({
276
277
  chainId: e.chainId
277
- }), (E = (P = this.iframe) == null ? void 0 : P.contentWindow) == null || E.postMessage(
278
+ }), (E = (x = this.iframe) == null ? void 0 : x.contentWindow) == null || E.postMessage(
278
279
  {
279
280
  type: "didSwitchChain",
280
281
  success: !0,
@@ -301,7 +302,7 @@ class D {
301
302
  const p = await this.opts.walletProvider.sendTransactionAsync(
302
303
  e.tx
303
304
  );
304
- (S = (z = this.iframe) == null ? void 0 : z.contentWindow) == null || S.postMessage(
305
+ (P = (z = this.iframe) == null ? void 0 : z.contentWindow) == null || P.postMessage(
305
306
  {
306
307
  type: "didSendTransaction",
307
308
  success: !0,
@@ -365,10 +366,10 @@ class D {
365
366
  this.opts = t;
366
367
  }
367
368
  get externalUrl() {
368
- var t, e, i, o, r;
369
+ var t, e, i, o, r, n;
369
370
  return `${this.baseUrl}${this.opts.app}?${this.opts.recipient ? `&recipient=${this.opts.recipient}` : ""}${this.opts.preferGaslessPayment ? "&preferGaslessPayment=true" : ""}${this.opts.mode ? `&mode=${this.opts.mode}` : ""}${this.opts.amount ? `&amount=${this.opts.amount}` : ""}${this.opts.chainId ? `&chainId=${this.opts.chainId}` : ""}${this.opts.currencyId ? `&currencyId=${this.opts.currencyId}` : ""}${this.opts.evm ? `&evm.chainId=${this.opts.evm.chainId}&evm.to=${this.opts.evm.to}&evm.data=${this.opts.evm.data || "0x0"}&evm.value=${ae(
370
371
  this.opts.evm.value || 0n
371
- )}` : ""}${this.opts.approval ? `&approval.token=${this.opts.approval.token}&approval.amount=${this.opts.approval.amount}` : ""}${this.opts.sessionMetadata ? `&metadata=${this.opts.sessionMetadata}` : ""}${this.opts.autoCloseOnSuccess ? "&autoCloseOnSuccess=true" : ""}${this.opts.sessionId ? `&sessionId=${this.opts.sessionId}` : ""}${(t = this.opts.chainIds) != null && t.length ? `&chainIds=${this.opts.chainIds.join(",")}` : ""}${(e = this.opts.excludeChainIds) != null && e.length ? `&excludeChainIds=${this.opts.excludeChainIds.join(",")}` : ""}${(i = this.opts.excludeCurrencyTiers) != null && i.length ? `&excludeCurrencyTiers=${this.opts.excludeCurrencyTiers.join(",")}` : ""}${(o = this.opts.excludeFundingSources) != null && o.length ? `&excludeFundingSources=${this.opts.excludeFundingSources.join(",")}` : ""}${(r = this.opts.fundingSources) != null && r.length ? `&fundingSources=${this.opts.fundingSources.join(",")}` : ""}${this.opts.debug ? "&debug=true" : ""}${this.opts.popupsBlocked ? "&popupsBlocked=true" : ""}${this.opts.disableWithdrawToSelfSuggestion ? "&disableWithdrawToSelfSuggestion=true" : ""}${this.opts.hideSettlementCopy ? "&hideSettlementCopy=true" : ""}${this.opts.gasRefuelAmountPerChain ? `&gasRefuelAmountPerChain=${encodeURIComponent(JSON.stringify(this.opts.gasRefuelAmountPerChain))}` : ""}`;
372
+ )}` : ""}${this.opts.approval ? `&approval.token=${this.opts.approval.token}&approval.amount=${this.opts.approval.amount}` : ""}${this.opts.sessionMetadata ? `&metadata=${this.opts.sessionMetadata}` : ""}${this.opts.autoCloseOnSuccess ? "&autoCloseOnSuccess=true" : ""}${this.opts.sessionId ? `&sessionId=${this.opts.sessionId}` : ""}${(t = this.opts.chainIds) != null && t.length ? `&chainIds=${this.opts.chainIds.join(",")}` : ""}${(e = this.opts.excludeChainIds) != null && e.length ? `&excludeChainIds=${this.opts.excludeChainIds.join(",")}` : ""}${(i = this.opts.excludeCurrencyTiers) != null && i.length ? `&excludeCurrencyTiers=${this.opts.excludeCurrencyTiers.join(",")}` : ""}${(o = this.opts.excludeFundingSources) != null && o.length ? `&excludeFundingSources=${this.opts.excludeFundingSources.join(",")}` : ""}${(r = this.opts.fundingSources) != null && r.length ? `&fundingSources=${this.opts.fundingSources.join(",")}` : ""}${(n = this.opts.allowedPaymentCurrencies) != null && n.length ? `&allowedPaymentCurrencies=${this.opts.allowedPaymentCurrencies.join(",")}` : ""}${this.opts.debug ? "&debug=true" : ""}${this.opts.popupsBlocked ? "&popupsBlocked=true" : ""}${this.opts.disableWithdrawToSelfSuggestion ? "&disableWithdrawToSelfSuggestion=true" : ""}${this.opts.hideSettlementCopy ? "&hideSettlementCopy=true" : ""}${this.opts.gasRefuelAmountPerChain ? `&gasRefuelAmountPerChain=${encodeURIComponent(JSON.stringify(this.opts.gasRefuelAmountPerChain))}` : ""}`;
372
373
  }
373
374
  initialize() {
374
375
  window.addEventListener("message", this.iframeEventHandler);
@@ -410,9 +411,9 @@ const me = ({
410
411
  currencyId: i,
411
412
  amount: o,
412
413
  gasRefuelAmountPerChain: r,
413
- preferGaslessPayment: c,
414
- chainIds: a,
415
- excludeChainIds: n,
414
+ preferGaslessPayment: n,
415
+ chainIds: c,
416
+ excludeChainIds: a,
416
417
  excludeCurrencyTiers: h,
417
418
  excludeFundingSources: u,
418
419
  fundingSources: m,
@@ -425,23 +426,23 @@ const me = ({
425
426
  walletProvider: d,
426
427
  localStorageProvider: v,
427
428
  onOpen: $,
428
- onSuccess: x,
429
- onClose: P,
429
+ onSuccess: S,
430
+ onClose: x,
430
431
  autoCloseOnSuccess: E,
431
432
  popupsBlocked: k,
432
433
  baseUrl: U,
433
434
  debug: z
434
435
  }) => {
435
- const S = M(() => new D({
436
+ const P = A(() => new M({
436
437
  app: s,
437
438
  recipient: t,
438
439
  chainId: e,
439
440
  currencyId: i,
440
441
  amount: o,
441
442
  gasRefuelAmountPerChain: r,
442
- preferGaslessPayment: c,
443
- chainIds: a,
444
- excludeChainIds: n,
443
+ preferGaslessPayment: n,
444
+ chainIds: c,
445
+ excludeChainIds: a,
445
446
  excludeCurrencyTiers: h,
446
447
  excludeFundingSources: u,
447
448
  fundingSources: m,
@@ -454,8 +455,8 @@ const me = ({
454
455
  walletProvider: d,
455
456
  localStorageProvider: v,
456
457
  onOpen: $,
457
- onSuccess: x,
458
- onClose: P,
458
+ onSuccess: S,
459
+ onClose: x,
459
460
  autoCloseOnSuccess: E,
460
461
  popupsBlocked: k,
461
462
  baseUrl: U,
@@ -467,9 +468,9 @@ const me = ({
467
468
  i,
468
469
  o,
469
470
  r,
471
+ n,
470
472
  c,
471
473
  a,
472
- n,
473
474
  h,
474
475
  u,
475
476
  m,
@@ -482,17 +483,17 @@ const me = ({
482
483
  d,
483
484
  v,
484
485
  $,
486
+ S,
485
487
  x,
486
- P,
487
488
  E,
488
489
  k,
489
490
  U,
490
491
  z
491
492
  ]);
492
493
  return {
493
- openGlideDeposit: S.open,
494
- externalUrl: S.externalUrl,
495
- opts: S.opts
494
+ openGlideDeposit: P.open,
495
+ externalUrl: P.externalUrl,
496
+ opts: P.opts
496
497
  };
497
498
  }, ge = ({
498
499
  app: s,
@@ -501,45 +502,47 @@ const me = ({
501
502
  excludeChainIds: i,
502
503
  excludeCurrencyTiers: o,
503
504
  excludeFundingSources: r,
504
- fundingSources: c,
505
+ fundingSources: n,
506
+ allowedPaymentCurrencies: c,
505
507
  hideSettlementCopy: a,
506
- amount: n,
507
- sessionId: h,
508
- sessionMetadata: u,
509
- theme: m,
510
- walletProvider: g,
511
- localStorageProvider: f,
512
- onOpen: y,
513
- onSuccess: w,
514
- onClose: l,
515
- autoCloseOnSuccess: b,
516
- popupsBlocked: d,
517
- baseUrl: v,
518
- debug: $
508
+ amount: h,
509
+ sessionId: u,
510
+ sessionMetadata: m,
511
+ theme: g,
512
+ walletProvider: f,
513
+ localStorageProvider: y,
514
+ onOpen: w,
515
+ onSuccess: l,
516
+ onClose: b,
517
+ autoCloseOnSuccess: d,
518
+ popupsBlocked: v,
519
+ baseUrl: $,
520
+ debug: S
519
521
  }) => {
520
- const x = M(() => new D({
522
+ const x = A(() => new M({
521
523
  app: s,
522
524
  preferGaslessPayment: t,
523
525
  chainIds: e,
524
526
  excludeChainIds: i,
525
527
  excludeCurrencyTiers: o,
526
528
  excludeFundingSources: r,
527
- fundingSources: c,
529
+ fundingSources: n,
530
+ allowedPaymentCurrencies: c,
528
531
  mode: "pay",
529
532
  hideSettlementCopy: a,
530
- sessionId: h,
531
- amount: n,
532
- sessionMetadata: u,
533
- theme: m,
534
- walletProvider: g,
535
- localStorageProvider: f,
536
- onOpen: y,
537
- onSuccess: w,
538
- onClose: l,
539
- autoCloseOnSuccess: b,
540
- popupsBlocked: d,
541
- baseUrl: v,
542
- debug: $
533
+ sessionId: u,
534
+ amount: h,
535
+ sessionMetadata: m,
536
+ theme: g,
537
+ walletProvider: f,
538
+ localStorageProvider: y,
539
+ onOpen: w,
540
+ onSuccess: l,
541
+ onClose: b,
542
+ autoCloseOnSuccess: d,
543
+ popupsBlocked: v,
544
+ baseUrl: $,
545
+ debug: S
543
546
  }), [
544
547
  s,
545
548
  t,
@@ -547,11 +550,11 @@ const me = ({
547
550
  i,
548
551
  o,
549
552
  r,
553
+ n,
550
554
  c,
551
555
  a,
552
- h,
553
- n,
554
556
  u,
557
+ h,
555
558
  m,
556
559
  g,
557
560
  f,
@@ -561,7 +564,8 @@ const me = ({
561
564
  b,
562
565
  d,
563
566
  v,
564
- $
567
+ $,
568
+ S
565
569
  ]);
566
570
  return {
567
571
  openGlidePay: x.open,
@@ -575,9 +579,9 @@ const me = ({
575
579
  preferGaslessPayment: i,
576
580
  chainIds: o,
577
581
  excludeChainIds: r,
578
- excludeCurrencyTiers: c,
579
- excludeFundingSources: a,
580
- sessionMetadata: n,
582
+ excludeCurrencyTiers: n,
583
+ excludeFundingSources: c,
584
+ sessionMetadata: a,
581
585
  theme: h,
582
586
  walletProvider: u,
583
587
  localStorageProvider: m,
@@ -589,16 +593,16 @@ const me = ({
589
593
  baseUrl: b,
590
594
  debug: d
591
595
  }) => {
592
- const v = M(() => new D({
596
+ const v = A(() => new M({
593
597
  app: s,
594
598
  evm: t,
595
599
  approval: e,
596
600
  preferGaslessPayment: i,
597
601
  chainIds: o,
598
602
  excludeChainIds: r,
599
- excludeCurrencyTiers: c,
600
- excludeFundingSources: a,
601
- sessionMetadata: n,
603
+ excludeCurrencyTiers: n,
604
+ excludeFundingSources: c,
605
+ sessionMetadata: a,
602
606
  mode: "call",
603
607
  theme: h,
604
608
  walletProvider: u,
@@ -617,9 +621,9 @@ const me = ({
617
621
  i,
618
622
  o,
619
623
  r,
624
+ n,
620
625
  c,
621
626
  a,
622
- n,
623
627
  h,
624
628
  u,
625
629
  m,
@@ -643,9 +647,9 @@ const me = ({
643
647
  currencyId: i,
644
648
  preferGaslessPayment: o,
645
649
  chainIds: r,
646
- excludeChainIds: c,
647
- excludeCurrencyTiers: a,
648
- excludeFundingSources: n,
650
+ excludeChainIds: n,
651
+ excludeCurrencyTiers: c,
652
+ excludeFundingSources: a,
649
653
  sessionMetadata: h,
650
654
  theme: u,
651
655
  walletProvider: m,
@@ -656,16 +660,16 @@ const me = ({
656
660
  autoCloseOnSuccess: l,
657
661
  baseUrl: b
658
662
  }) => {
659
- const d = M(() => new D({
663
+ const d = A(() => new M({
660
664
  app: s,
661
665
  recipient: t,
662
666
  chainId: e,
663
667
  currencyId: i,
664
668
  preferGaslessPayment: o,
665
669
  chainIds: r,
666
- excludeChainIds: c,
667
- excludeCurrencyTiers: a,
668
- excludeFundingSources: n,
670
+ excludeChainIds: n,
671
+ excludeCurrencyTiers: c,
672
+ excludeFundingSources: a,
669
673
  sessionMetadata: h,
670
674
  mode: "buy",
671
675
  theme: u,
@@ -683,9 +687,9 @@ const me = ({
683
687
  i,
684
688
  o,
685
689
  r,
690
+ n,
686
691
  c,
687
692
  a,
688
- n,
689
693
  h,
690
694
  u,
691
695
  m,
@@ -734,7 +738,7 @@ const me = ({
734
738
  })
735
739
  });
736
740
  export {
737
- D as GlideDeposit,
741
+ M as GlideDeposit,
738
742
  we as browserLocalStorageProvider,
739
743
  ye as useGlideBuy,
740
744
  fe as useGlideCall,
@@ -10,6 +10,7 @@ type UseGlidePayProps = {
10
10
  excludeCurrencyTiers?: ("tier1" | "tier2" | "tier3")[];
11
11
  excludeFundingSources?: FundingSource[];
12
12
  fundingSources?: FundingSource[];
13
+ allowedPaymentCurrencies?: string[];
13
14
  hideSettlementCopy?: boolean;
14
15
  sessionId?: string;
15
16
  sessionMetadata?: string;
@@ -24,7 +25,7 @@ type UseGlidePayProps = {
24
25
  baseUrl?: string;
25
26
  debug?: boolean;
26
27
  };
27
- export declare const useGlidePay: ({ app, preferGaslessPayment, chainIds, excludeChainIds, excludeCurrencyTiers, excludeFundingSources, fundingSources, hideSettlementCopy, amount, sessionId, sessionMetadata, theme, walletProvider, localStorageProvider, onOpen, onSuccess, onClose, autoCloseOnSuccess, popupsBlocked, baseUrl, debug, }: UseGlidePayProps) => {
28
+ export declare const useGlidePay: ({ app, preferGaslessPayment, chainIds, excludeChainIds, excludeCurrencyTiers, excludeFundingSources, fundingSources, allowedPaymentCurrencies, hideSettlementCopy, amount, sessionId, sessionMetadata, theme, walletProvider, localStorageProvider, onOpen, onSuccess, onClose, autoCloseOnSuccess, popupsBlocked, baseUrl, debug, }: UseGlidePayProps) => {
28
29
  openGlidePay: () => void;
29
30
  externalUrl: string;
30
31
  opts: import('./GlideDeposit.ts').GlideDepositOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paywithglide/glide-react",
3
- "version": "0.0.38",
3
+ "version": "0.0.39",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -20,7 +20,7 @@
20
20
  "build": "tsc --p ./tsconfig.build.json && vite build",
21
21
  "build-web": "tsc --p ./tsconfig.build.json && vite build --mode web",
22
22
  "build-chromeext": "tsc --p ./tsconfig.build.json && vite build --mode chromeext:popup && vite build --mode chromeext:content && vite build --mode chromeext:background",
23
- "lint": "prettier --check . && eslint .",
23
+ "lint": "prettier --check . && eslint . --max-warnings 0 && tsc --p ./tsconfig.build.json",
24
24
  "preview": "vite preview",
25
25
  "prepublishOnly": "npm run build"
26
26
  },