tek-wallet 0.0.525 → 0.0.526

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.
@@ -53,24 +53,22 @@ function Fees(props) {
53
53
  if (!(feesData === null || feesData === void 0 ? void 0 : feesData.feeDetail))
54
54
  return result;
55
55
  var feeDetail = JSON.parse(JSON.stringify(feesData === null || feesData === void 0 ? void 0 : feesData.feeDetail));
56
- feeDetail === null || feeDetail === void 0 ? void 0 : feeDetail.forEach(function (fee) {
57
- var _a, _b, _c;
58
- var index = result === null || result === void 0 ? void 0 : result.findIndex(function (feeDetail) { var _a, _b; return ((_a = feeDetail.currency) === null || _a === void 0 ? void 0 : _a.slug) === ((_b = fee === null || fee === void 0 ? void 0 : fee.currency) === null || _b === void 0 ? void 0 : _b.slug); });
59
- if (index === -1) {
60
- result.push(fee);
61
- }
62
- else {
63
- result[index].feeFixed += fee.feeFixed;
64
- result[index].feeInCurrency += fee.feeInCurrency;
65
- result[index].feeInUSD += fee.feeInUSD;
66
- result[index].feePercent += fee.feePercent;
67
- var totalFeeInCurrency = (_a = result[index].feeInCurrency) !== null && _a !== void 0 ? _a : 0;
68
- var balanceUseToPaidFee = getBalanceUseToPaidFee((_c = (_b = fee === null || fee === void 0 ? void 0 : fee.currency) === null || _b === void 0 ? void 0 : _b.slug) !== null && _c !== void 0 ? _c : "");
69
- result[index].isEnoughBalanceToPay = +(balanceUseToPaidFee !== null && balanceUseToPaidFee !== void 0 ? balanceUseToPaidFee : 0) >= totalFeeInCurrency;
70
- }
71
- });
56
+ // feeDetail?.forEach((fee: FeeDetailType) => {
57
+ // const index = result?.findIndex((feeDetail) => feeDetail.currency?.slug === fee?.currency?.slug);
58
+ // if (index === -1) {
59
+ // result.push(fee);
60
+ // } else {
61
+ // result[index].feeFixed += fee.feeFixed;
62
+ // result[index].feeInCurrency += fee.feeInCurrency;
63
+ // result[index].feeInUSD += fee.feeInUSD;
64
+ // result[index].feePercent += fee.feePercent;
65
+ // const totalFeeInCurrency = result[index].feeInCurrency ?? 0;
66
+ // const balanceUseToPaidFee = getBalanceUseToPaidFee(fee?.currency?.slug ?? "");
67
+ // result[index].isEnoughBalanceToPay = +(balanceUseToPaidFee ?? 0) >= totalFeeInCurrency;
68
+ // }
69
+ // });
72
70
  console.warn("🚀 ~ const tokensFeeGroupBySlug:FeeDetailType[]=useMemo ~ feesData:", feesData);
73
- return result;
71
+ return feeDetail;
74
72
  }, [feesData === null || feesData === void 0 ? void 0 : feesData.feeDetail, getBalanceUseToPaidFee]);
75
73
  var feeCheckedBalance = (0, react_1.useMemo)(function () {
76
74
  var _a, _b;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.525",
3
+ "version": "0.0.526",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",