60p82u21t54k 1.1.43 → 1.1.45

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.
@@ -379,6 +379,9 @@ const timeConversion = (date, fromTimeZone, toTimeZone) => {
379
379
  return new Date(date.getTime() + tzDifference * 60 * 60 * 1e3);
380
380
  };
381
381
  const currentTS = Date.now();
382
+ const buildQuery = (params) => {
383
+ return new URLSearchParams(Object.entries(params).map(([k, v]) => [k, String(v)]));
384
+ };
382
385
  class DefaultApiModelRegistry {
383
386
  constructor() {
384
387
  __publicField(this, "models", /* @__PURE__ */ new Map());
@@ -1317,24 +1320,12 @@ const getGetUserProfileResponse = (raw) => {
1317
1320
  dateCreated: (_c = raw.mdUserDetail.datecreated) != null ? _c : "",
1318
1321
  email: (_d = raw.mdUserDetail.email) != null ? _d : "",
1319
1322
  fullName: (_e = raw.mdUserDetail.firstname) != null ? _e : "",
1320
- phoneNumber: getFinalPhoneNoString(
1321
- (_g = (_f = raw.mdUserDetail.country) == null ? void 0 : _f.area_code) != null ? _g : "",
1322
- (_h = raw.mdUserDetail.mobileno) != null ? _h : ""
1323
- ),
1323
+ phoneNumber: (_f = raw.mdUserDetail.mobileno) != null ? _f : "",
1324
+ phoneNumberAreaCode: (_h = (_g = raw.mdUserDetail.country) == null ? void 0 : _g.area_code) != null ? _h : "",
1324
1325
  profilePicUrl: (_i = raw.mdUserDetail.profile_pic) != null ? _i : "",
1325
1326
  isPhoneNumVerified: raw.mdUserDetail.isVerify == "1"
1326
1327
  };
1327
1328
  };
1328
- const getFinalPhoneNoString = (areaCode, phoneNo) => {
1329
- if (!phoneNo || phoneNo == "") return "";
1330
- if (!areaCode || areaCode == "") return phoneNo;
1331
- if (areaCode == "+60" && phoneNo.startsWith("0")) {
1332
- const tempPhoneNo = phoneNo.substring(1, phoneNo.length);
1333
- return `${areaCode}${tempPhoneNo}`;
1334
- } else {
1335
- return `${areaCode}${phoneNo}`;
1336
- }
1337
- };
1338
1329
  const modifyGetUserProfileRequest = (requests) => {
1339
1330
  return requests;
1340
1331
  };
@@ -2497,10 +2488,11 @@ const getGetBankCardDataResponse = (raw) => {
2497
2488
  };
2498
2489
  })) != null ? _f : [],
2499
2490
  cryptoAccount: (_h = (_g = raw.mdAccountCrypto) == null ? void 0 : _g.map((item) => {
2500
- var _a2;
2491
+ var _a2, _b2;
2501
2492
  return {
2502
2493
  id: item.id,
2503
2494
  name: getCryptoName(raw.mdCryptoDetail.cryptoNetworks, (_a2 = item.cn_id) != null ? _a2 : 0),
2495
+ networkId: (_b2 = item.cn_id) != null ? _b2 : 0,
2504
2496
  address: item.address
2505
2497
  };
2506
2498
  })) != null ? _h : [],
@@ -7676,8 +7668,12 @@ const registerAllApiModels = () => {
7676
7668
  }
7677
7669
  };
7678
7670
  registerAllApiModels();
7679
- const get = (endpoint) => __async(void 0, null, function* () {
7680
- const response = yield fetchWithTimeout(`${endpoint}`, {
7671
+ const get = (endpoint, query = null) => __async(void 0, null, function* () {
7672
+ let requestPath = endpoint;
7673
+ if (query) {
7674
+ requestPath = `${requestPath}?${buildQuery(query)}`;
7675
+ }
7676
+ const response = yield fetchWithTimeout(requestPath, {
7681
7677
  method: "GET",
7682
7678
  headers: authHeaders(),
7683
7679
  credentials: "include"