@ape.swap/bonds-sdk 4.1.1-test.1 → 4.1.1-test.3

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 +58 -4
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -65964,7 +65964,7 @@ const BLOCK_EXPLORER = {
65964
65964
  [types$1.ChainId.IOTA_TESTNET]: 'https://explorer.evm.testnet.iotaledger.net/',
65965
65965
  [types$1.ChainId.BASE]: 'https://basescan.org',
65966
65966
  [types$1.ChainId.GRAPHLINQ]: 'https://graphlinq.dex.guru',
65967
- [types$1.ChainId.AVAX]: 'https://snowscan.xyz',
65967
+ [types$1.ChainId.AVAX]: 'https://snowtrace.io/',
65968
65968
  [types$1.ChainId.BLAST]: 'https://blastscan.io',
65969
65969
  [types$1.ChainId.CROSSFI]: 'https://xfiscan.com',
65970
65970
  [types$1.ChainId.MONAD_TESTNET]: 'https://testnet.monadexplorer.com/',
@@ -80919,7 +80919,7 @@ function calculateTrueBondPrice(bondPricing, bondTerm, currentTimestamp, princip
80919
80919
  const price = numerator.dividedBy(principalDecimalsMultiplier).dividedBy(e18);
80920
80920
  // Apply minimum debt floor
80921
80921
  const priceToUse = price.lt(minimumDebt) ? minimumDebt : price;
80922
- const feeToUse = feeInPrincipal * 2; // HOTFIX!!!!!!!
80922
+ const feeToUse = feeInPrincipal;
80923
80923
  const reverseFee = new BigNumber$1(feeToUse / 100 / (1 - feeToUse / 100));
80924
80924
  return new BigNumber$1(priceToUse).plus(new BigNumber$1(priceToUse).times(reverseFee)).toFixed(0);
80925
80925
  }
@@ -81700,6 +81700,16 @@ const WNATIVE = {
81700
81700
  },
81701
81701
  active: true,
81702
81702
  },
81703
+ [types$1.ChainId.AVAX]: {
81704
+ symbol: 'wAVAX',
81705
+ address: {
81706
+ [types$1.ChainId.AVAX]: '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7',
81707
+ },
81708
+ decimals: {
81709
+ [types$1.ChainId.AVAX]: 18,
81710
+ },
81711
+ active: true,
81712
+ },
81703
81713
  };
81704
81714
  const zapInputTokens = {
81705
81715
  [types$1.ChainId.MAINNET]: [
@@ -82245,6 +82255,48 @@ const zapInputTokens = {
82245
82255
  active: true,
82246
82256
  },
82247
82257
  ],
82258
+ [types$1.ChainId.AVAX]: [
82259
+ {
82260
+ symbol: 'wAVAX',
82261
+ address: {
82262
+ [types$1.ChainId.AVAX]: '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7',
82263
+ },
82264
+ decimals: {
82265
+ [types$1.ChainId.AVAX]: 18,
82266
+ },
82267
+ active: true,
82268
+ },
82269
+ {
82270
+ symbol: 'USDT',
82271
+ address: {
82272
+ [types$1.ChainId.AVAX]: '0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7',
82273
+ },
82274
+ decimals: {
82275
+ [types$1.ChainId.AVAX]: 6,
82276
+ },
82277
+ active: true,
82278
+ },
82279
+ {
82280
+ symbol: 'USDC',
82281
+ address: {
82282
+ [types$1.ChainId.AVAX]: '0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e',
82283
+ },
82284
+ decimals: {
82285
+ [types$1.ChainId.AVAX]: 6,
82286
+ },
82287
+ active: true,
82288
+ },
82289
+ {
82290
+ symbol: 'BTC',
82291
+ address: {
82292
+ [types$1.ChainId.AVAX]: '0x0555E30da8f98308EdB960aa94C0Db47230d2B9c',
82293
+ },
82294
+ decimals: {
82295
+ [types$1.ChainId.AVAX]: 8,
82296
+ },
82297
+ active: true,
82298
+ },
82299
+ ],
82248
82300
  };
82249
82301
 
82250
82302
  const getNativeTicker = (chain) => {
@@ -85138,8 +85190,7 @@ const BuyComponentSolana = ({ onDismiss, bondAddress, bondChain, isProjectView,
85138
85190
  const amountBigInt = BigInt(depositAmount.toFixed(0));
85139
85191
  const user = accountSolana;
85140
85192
  const trueBondPriceWithoutFee = (_c = (_b = bondData === null || bondData === void 0 ? void 0 : bondData.trueBondPrices) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.trueBondPrice;
85141
- const feeInPrincipal = bondData === null || bondData === void 0 ? void 0 : bondData.feeInPrincipal;
85142
- const slippage = 0.5 - (feeInPrincipal !== null && feeInPrincipal !== void 0 ? feeInPrincipal : 0);
85193
+ const slippage = 0.5;
85143
85194
  const maxPrice = new BigNumber$1(trueBondPriceWithoutFee !== null && trueBondPriceWithoutFee !== void 0 ? trueBondPriceWithoutFee : '0')
85144
85195
  .times((100 + slippage) / 100)
85145
85196
  .dividedBy(new BigNumber$1(1e6))
@@ -85375,6 +85426,9 @@ const ModalHandler = ({ onDismiss, bondAddress, bondChain, }) => {
85375
85426
  }
85376
85427
  });
85377
85428
  console.log(purchasedBond);
85429
+ if (!purchasedBond) {
85430
+ console.log(`No bond found for ${billId}`);
85431
+ }
85378
85432
  setUserBill(purchasedBond);
85379
85433
  })
85380
85434
  .catch((e) => {
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": "4.1.1-test.1",
6
+ "version": "4.1.1-test.3",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",