@ape.swap/bonds-sdk 3.0.73 → 3.0.75

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.
Files changed (2) hide show
  1. package/dist/main.js +6 -20
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -78462,13 +78462,11 @@ const useSoulZapBondQuote = (typedValue, inputCurrency, bond, account, tierProof
78462
78462
  ];
78463
78463
  }, [zapInputData]);
78464
78464
  const fetchZapDetails = () => __awaiter$9(void 0, void 0, void 0, function* () {
78465
- var _a, _b, _c, _d, _e, _f;
78466
- console.log('Making Bond Zap call');
78465
+ var _a, _b, _c;
78467
78466
  const response = yield axios.post(SOUL_ZAP_API, {
78468
78467
  '0': zapInputData,
78469
78468
  });
78470
- console.log((_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.result) === null || _c === void 0 ? void 0 : _c.data);
78471
- return (_f = (_e = (_d = response.data) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.result) === null || _f === void 0 ? void 0 : _f.data;
78469
+ return (_c = (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.result) === null || _c === void 0 ? void 0 : _c.data;
78472
78470
  });
78473
78471
  const { data: response, isLoading, isFetching, error, } = useQuery({
78474
78472
  queryKey: [QUERY_KEYS.ZAP_TOKEN_QUOTE, queryKey],
@@ -79070,7 +79068,7 @@ const LoadingSpinner = ({ isLoading, size }) => {
79070
79068
  return jsx$2(Flex, { sx: isLoading ? stylesLoading : styles });
79071
79069
  };
79072
79070
 
79073
- const stepDelay = 1000;
79071
+ const stepDelay = 3000;
79074
79072
  const TransactionModal = ({ onDismiss, txChain, approvalState, approveCallback, loadingTx, txCallback, bondData, inputToken, inputValue, depositAmount, buyTxHash, rateChanged, }) => {
79075
79073
  var _a, _b, _c, _d, _e;
79076
79074
  // Hooks
@@ -79123,10 +79121,8 @@ const TransactionModal = ({ onDismiss, txChain, approvalState, approveCallback,
79123
79121
  const hasTriggeredApproval = useRef(false);
79124
79122
  useEffect(() => {
79125
79123
  if (!hasToSwitchChain || !showSwitchChainFlow) {
79126
- if (inputToken === 'NATIVE')
79127
- setApproveLoading(true);
79124
+ setApproveLoading(true);
79128
79125
  if (approvalState === ApprovalState.APPROVED) {
79129
- setApproveLoading(true);
79130
79126
  const delay = setTimeout(() => {
79131
79127
  setApproveLoading(false);
79132
79128
  setHasToApprove(false);
@@ -79135,15 +79131,8 @@ const TransactionModal = ({ onDismiss, txChain, approvalState, approveCallback,
79135
79131
  }
79136
79132
  else if (!hasTriggeredApproval.current && approvalState !== ApprovalState.PENDING) {
79137
79133
  setApproveLoading(true);
79138
- const delay = setTimeout(() => {
79139
- hasTriggeredApproval.current = true;
79140
- handleApprove();
79141
- }, stepDelay);
79142
- return () => clearTimeout(delay);
79143
- }
79144
- else {
79145
- console.log('bingo!');
79146
- setApproveLoading(false);
79134
+ hasTriggeredApproval.current = true;
79135
+ handleApprove();
79147
79136
  }
79148
79137
  }
79149
79138
  }, [hasToSwitchChain, approvalState]);
@@ -79156,7 +79145,6 @@ const TransactionModal = ({ onDismiss, txChain, approvalState, approveCallback,
79156
79145
  onDismiss();
79157
79146
  }
79158
79147
  else {
79159
- console.log('trigger tx');
79160
79148
  setApproveLoading(false);
79161
79149
  txCallback();
79162
79150
  }
@@ -79466,7 +79454,6 @@ const BuyBond = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond, isPro
79466
79454
  zapEnabled &&
79467
79455
  (sortedZapList === null || sortedZapList === void 0 ? void 0 : sortedZapList.length) > 0 &&
79468
79456
  sortedZapList[0].usdValue !== 0) {
79469
- console.log('setting input token');
79470
79457
  setHasChecked(true);
79471
79458
  setInputTokenString(sortedZapList[0].token === 'NATIVE' ? 'NATIVE' : sortedZapList[0].token.address[bondChain]);
79472
79459
  }
@@ -80008,7 +79995,6 @@ function useHotBonds() {
80008
79995
  }
80009
79996
  const getHotBondsContracts = (apiUrl) => __awaiter$9(void 0, void 0, void 0, function* () {
80010
79997
  try {
80011
- console.log('call!');
80012
79998
  const response = yield axios.get(`${STRAPI_URL}/hot-bonds`);
80013
79999
  return response.data.map((bond) => bond.BondAddress.toLowerCase());
80014
80000
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Ape Bond SDK",
4
4
  "author": "Ape Bond",
5
5
  "license": "MIT",
6
- "version": "3.0.73",
6
+ "version": "3.0.75",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",