60p82u21t54k 1.1.45 → 1.1.46

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.
@@ -1320,12 +1320,24 @@ const getGetUserProfileResponse = (raw) => {
1320
1320
  dateCreated: (_c = raw.mdUserDetail.datecreated) != null ? _c : "",
1321
1321
  email: (_d = raw.mdUserDetail.email) != null ? _d : "",
1322
1322
  fullName: (_e = raw.mdUserDetail.firstname) != null ? _e : "",
1323
- phoneNumber: (_f = raw.mdUserDetail.mobileno) != null ? _f : "",
1324
- phoneNumberAreaCode: (_h = (_g = raw.mdUserDetail.country) == null ? void 0 : _g.area_code) != null ? _h : "",
1323
+ phoneNumber: getFinalPhoneNoString(
1324
+ (_g = (_f = raw.mdUserDetail.country) == null ? void 0 : _f.area_code) != null ? _g : "",
1325
+ (_h = raw.mdUserDetail.mobileno) != null ? _h : ""
1326
+ ),
1325
1327
  profilePicUrl: (_i = raw.mdUserDetail.profile_pic) != null ? _i : "",
1326
1328
  isPhoneNumVerified: raw.mdUserDetail.isVerify == "1"
1327
1329
  };
1328
1330
  };
1331
+ const getFinalPhoneNoString = (areaCode, phoneNo) => {
1332
+ if (!phoneNo || phoneNo == "") return "";
1333
+ if (!areaCode || areaCode == "") return phoneNo;
1334
+ if (areaCode == "+60" && phoneNo.startsWith("0")) {
1335
+ const tempPhoneNo = phoneNo.substring(1, phoneNo.length);
1336
+ return `${areaCode}${tempPhoneNo}`;
1337
+ } else {
1338
+ return `+${phoneNo}`;
1339
+ }
1340
+ };
1329
1341
  const modifyGetUserProfileRequest = (requests) => {
1330
1342
  return requests;
1331
1343
  };
@@ -2448,7 +2460,7 @@ const modifyApplyVipBonusResponse = (result) => {
2448
2460
  return result;
2449
2461
  };
2450
2462
  const getGetBankCardDataResponse = (raw) => {
2451
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
2463
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
2452
2464
  return {
2453
2465
  bankCard: (_b = (_a = raw.bankCard) == null ? void 0 : _a.map((item) => {
2454
2466
  var _a2, _b2, _c2, _d2;
@@ -2488,23 +2500,22 @@ const getGetBankCardDataResponse = (raw) => {
2488
2500
  };
2489
2501
  })) != null ? _f : [],
2490
2502
  cryptoAccount: (_h = (_g = raw.mdAccountCrypto) == null ? void 0 : _g.map((item) => {
2491
- var _a2, _b2;
2492
2503
  return {
2493
- id: item.id,
2494
- name: getCryptoName(raw.mdCryptoDetail.cryptoNetworks, (_a2 = item.cn_id) != null ? _a2 : 0),
2495
- networkId: (_b2 = item.cn_id) != null ? _b2 : 0,
2504
+ id: item.crypto_id,
2505
+ type: item.type,
2506
+ name: item.crypto_name,
2496
2507
  address: item.address
2497
2508
  };
2498
2509
  })) != null ? _h : [],
2499
2510
  cryptoDetail: {
2500
- limit: raw.mdCryptoDetail.cryptolimit,
2501
- network: (_j = (_i = raw.mdCryptoDetail.cryptoNetworks) == null ? void 0 : _i.map((item) => {
2511
+ limit: (_j = (_i = raw.mdCryptoDetail) == null ? void 0 : _i.cryptolimit) != null ? _j : 0,
2512
+ protocol: (_m = (_l = (_k = raw.mdCryptoDetail) == null ? void 0 : _k.cryptoprotocol) == null ? void 0 : _l.map((item) => {
2502
2513
  return {
2503
2514
  id: item.id,
2504
- name: `${item.name} (${item.value.toUpperCase()})`,
2505
- value: item.value
2515
+ name: item.name,
2516
+ status: item.status == "1"
2506
2517
  };
2507
- })) != null ? _j : []
2518
+ })) != null ? _m : []
2508
2519
  },
2509
2520
  alipayData: raw.subWithdrawalAlipayData,
2510
2521
  user: {
@@ -2516,12 +2527,6 @@ const getGetBankCardDataResponse = (raw) => {
2516
2527
  bankCardLimit: raw.bankcardlimit
2517
2528
  };
2518
2529
  };
2519
- const getCryptoName = (networkList, networkId) => {
2520
- if (!networkList) return "";
2521
- const targetIndex = networkList.findIndex((network) => network.id == networkId);
2522
- const target = networkList[targetIndex];
2523
- return `${target.name} (${target.value.toUpperCase()})`;
2524
- };
2525
2530
  const modifyGetBankCardDataRequest = (requests) => {
2526
2531
  return requests;
2527
2532
  };