@txgw/payout-components 0.3.0 → 0.3.1

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.
@@ -35,7 +35,7 @@ function Q(t) {
35
35
  return 0;
36
36
  }
37
37
  let h = null;
38
- const H = 300;
38
+ const U = 300;
39
39
  function S(t, n) {
40
40
  h && (clearTimeout(h), h = null);
41
41
  const o = Q(t);
@@ -43,7 +43,7 @@ function S(t, n) {
43
43
  return;
44
44
  const r = Math.max(
45
45
  0,
46
- (o - H) * 1e3
46
+ (o - U) * 1e3
47
47
  );
48
48
  h = setTimeout(async () => {
49
49
  try {
@@ -63,7 +63,7 @@ function S(t, n) {
63
63
  }
64
64
  }, r);
65
65
  }
66
- function U() {
66
+ function H() {
67
67
  h && (clearTimeout(h), h = null);
68
68
  }
69
69
  function A() {
@@ -91,7 +91,7 @@ async function b(t, n, o, r = 1) {
91
91
  e.refresh_token
92
92
  ), S(e.expires_in, p);
93
93
  }
94
- const k = await fetch(t, {
94
+ const k = await fetch(new URL(t, p), {
95
95
  ...o,
96
96
  body: JSON.stringify({
97
97
  ...n,
@@ -113,7 +113,7 @@ async function b(t, n, o, r = 1) {
113
113
  p
114
114
  );
115
115
  if (!g.access_token || !g.refresh_token)
116
- A(), U();
116
+ A(), H();
117
117
  else
118
118
  return R(
119
119
  g.access_token,
@@ -230,7 +230,7 @@ function ee({
230
230
  inputPaymentMethod: c?.payment_method,
231
231
  inputRegionCode: c?.region_code,
232
232
  inputCurrency: c?.currency
233
- }), [d, g] = y.useState(), [I, F] = y.useState(), w = y.useMemo(() => !i?.layout?.find(
233
+ }), [d, g] = y.useState(), [I, L] = y.useState(), w = y.useMemo(() => !i?.layout?.find(
234
234
  (a) => a.name === z
235
235
  )?.hidden, [i?.layout]), P = y.useCallback(
236
236
  (s) => {
@@ -241,7 +241,7 @@ function ee({
241
241
  s.body[a].onFinished = (m) => {
242
242
  const $ = K(u.api.data, m, void 0, !0);
243
243
  r.emit("submit", $.value);
244
- }, F(s);
244
+ }, L(s);
245
245
  },
246
246
  [r]
247
247
  ), x = y.useMemo(() => {
@@ -252,7 +252,7 @@ function ee({
252
252
  label: u.country_name_standard || u.country_name,
253
253
  value: u.country_code
254
254
  })).sort((u, m) => u.label.localeCompare(m.label));
255
- }, [l]), [v, L] = y.useState();
255
+ }, [l]), [v, F] = y.useState();
256
256
  y.useEffect(() => {
257
257
  if (!e?.inputRegionCode || !e?.inputPayoutType) return;
258
258
  const s = e.inputRegionCode;
@@ -262,7 +262,7 @@ function ee({
262
262
  const u = Object.keys(
263
263
  a.countries?.[s].payoutTypes?.[e.inputPayoutType]?.currencies
264
264
  );
265
- u && u.length > 0 && L(
265
+ u && u.length > 0 && F(
266
266
  u.map((m) => ({
267
267
  label: m,
268
268
  value: m
package/dist/index.js CHANGED
@@ -34,7 +34,7 @@ class d {
34
34
  }
35
35
  }
36
36
  const g = {
37
- beneficiaryForm: () => import("./component-beneficiary-form-BD2XaMAL.js")
37
+ beneficiaryForm: () => import("./component-beneficiary-form-BIz4pTeo.js")
38
38
  }, w = {
39
39
  staticData: {
40
40
  en: () => import("./en-Cb5xUNU4.js")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@txgw/payout-components",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"