@ape.swap/bonds-sdk 2.4.1 → 2.5.1

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.
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ declare const RestrictedRegionModal: ({ onDismiss }: {
3
+ onDismiss?: () => void;
4
+ }) => React.JSX.Element;
5
+ export default RestrictedRegionModal;
@@ -7,5 +7,4 @@ export declare const PRICE_GETTER_ADDRESSES: AddressMap;
7
7
  export declare const MULTICALL_V2: AddressMap;
8
8
  export declare const SoulZapTokenManager: Partial<Record<ChainId, string>>;
9
9
  export declare const ACF_TO_ABOND: string;
10
- export declare const LENS_CONTRACT: AddressMap;
11
10
  export {};
@@ -33,4 +33,5 @@ export declare const QUERY_KEYS: {
33
33
  CHAIN_FILTER_OPTION: string;
34
34
  FAVORITE_TOKENS: string;
35
35
  POP_UPS: string;
36
+ GEO_FENCING: string;
36
37
  };
package/dist/main.js CHANGED
@@ -18842,6 +18842,7 @@ const QUERY_KEYS = {
18842
18842
  CHAIN_FILTER_OPTION: 'ApeBond-SDK-chainFilterOption',
18843
18843
  FAVORITE_TOKENS: 'ApeBond-SDK-favoriteTokens',
18844
18844
  POP_UPS: 'ApeBond-SDK-popUps',
18845
+ GEO_FENCING: 'ApeBond-SDK-geoFencing',
18845
18846
  };
18846
18847
 
18847
18848
  function useCookie(key, defaultValue) {
@@ -39210,6 +39211,10 @@ const vestingTimeRemaining = (userBill) => {
39210
39211
  const currentTime = new Date().getTime() / 1000;
39211
39212
  return getTimePeriods(parseInt(userBill.lastBlockTimestamp) + parseInt(userBill.vesting) - currentTime, true);
39212
39213
  };
39214
+ const vestingTimeRemainingYourBonds = (userBill) => {
39215
+ const currentTime = new Date().getTime() / 1000;
39216
+ return (parseInt(userBill.lastBlockTimestamp) + parseInt(userBill.vesting) - currentTime);
39217
+ };
39213
39218
  const discountEarnTokenPrice = (bond) => {
39214
39219
  var _a, _b;
39215
39220
  const earnTokenPrice = parseFloat((_a = bond === null || bond === void 0 ? void 0 : bond.payoutTokenPrice) !== null && _a !== void 0 ? _a : '0');
@@ -49035,7 +49040,7 @@ const PRICE_GETTER_ADDRESSES = {
49035
49040
  [types.ChainId.LINEA]: '0x35b1eadAbaDD0Edd26076247f3dEdF9E15De8D5D',
49036
49041
  [types.ChainId.LIGHTLINK]: '0xC22Db8dDe3A3591fFB02be868Ce2901d30671FE4',
49037
49042
  [types.ChainId.IOTA]: '0xC22Db8dDe3A3591fFB02be868Ce2901d30671FE4',
49038
- [types.ChainId.BASE]: '0x2e6AB3cc819BE64886C1bB403813cCBec0407a5b',
49043
+ [types.ChainId.BASE]: '0xE29C74B4DD05A268B5FFaadeF4fdbAa1de6FDe84',
49039
49044
  [types.ChainId.AVAX]: '0x70005Da62E17041977f7F99f91098b125CcDE1a7',
49040
49045
  };
49041
49046
  const MULTICALL_V2 = {
@@ -49064,9 +49069,6 @@ const SoulZapTokenManager = {
49064
49069
  [types.ChainId.AVAX]: '0xC4dE46cBE21400dabE2E7c66E04F43acE4b5b910',
49065
49070
  };
49066
49071
  const ACF_TO_ABOND = '0xEce2b9C3704632Ce760271B0b84E3A4A698Ca962';
49067
- const LENS_CONTRACT = {
49068
- [types.ChainId.BSC]: '0x6Fb7A34A271cc0F4016db6A3BAA6206757a9a164',
49069
- };
49070
49072
 
49071
49073
  var bn$1 = {exports: {}};
49072
49074
 
@@ -71712,9 +71714,9 @@ const YourBonds = () => {
71712
71714
  return;
71713
71715
  if (sortConfig === null) {
71714
71716
  const sortedBills = (_a = [...userBonds]) === null || _a === void 0 ? void 0 : _a.sort((a, b) => {
71715
- const claimableDifference = parseFloat(claimable(b).toFixed(3)) - parseFloat(claimable(a).toFixed(3));
71716
- if (claimableDifference !== 0) {
71717
- return claimableDifference;
71717
+ const vestingDifference = parseFloat(vestingTimeRemainingYourBonds(b).toFixed(3)) - parseFloat(vestingTimeRemainingYourBonds(a).toFixed(3));
71718
+ if (vestingDifference !== 0) {
71719
+ return vestingDifference;
71718
71720
  }
71719
71721
  return 0;
71720
71722
  });
@@ -71913,25 +71915,7 @@ function useBondsData() {
71913
71915
  const getBondsData = (realTimeApiURL, tokenPrices, bondList) => __awaiter$9(void 0, void 0, void 0, function* () {
71914
71916
  try {
71915
71917
  const response = yield axios.get(realTimeApiURL);
71916
- const mockBonds = response.data.bonds.map((bond) => {
71917
- let minTier = null;
71918
- let tags = bond.tags;
71919
- if (bond.index === 8015) {
71920
- minTier = 4;
71921
- tags = ['CHRISTMAS SALE'];
71922
- }
71923
- if (bond.index === 8022 || bond.index === 1104) {
71924
- minTier = 3;
71925
- tags = ['CHRISTMAS SALE'];
71926
- }
71927
- if (bond.index === 8014) {
71928
- minTier = 2;
71929
- tags = ['CHRISTMAS SALE'];
71930
- }
71931
- return Object.assign(Object.assign({}, bond), { minTier,
71932
- tags });
71933
- });
71934
- return mockBonds;
71918
+ return response.data.bonds;
71935
71919
  }
71936
71920
  catch (_a) {
71937
71921
  const billData = [];
@@ -74065,7 +74049,7 @@ const BondModalHeader = ({ bondData, onDismiss, showProjectInfoButton, }) => {
74065
74049
  },
74066
74050
  });
74067
74051
  };
74068
- return (jsxs(Flex, { className: "modaltable-container title-container", children: [jsxs(Flex, { className: "title-container bondicon", children: [jsx$2("img", { src: "./images/bills/xmasHat.png", alt: "xmas-hat", className: "xmas-hat" }), jsx$2(TokenImage, { symbol: (_a = bondData.showcaseTokenName) !== null && _a !== void 0 ? _a : bondData.earnToken.symbol, size: 50, chain: bondData.chainId })] }), jsxs(Flex, { className: "title-container bondname", children: [bondData === null || bondData === void 0 ? void 0 : bondData.showcaseTokenName, jsx$2(ListTag, { text: (_b = bondData === null || bondData === void 0 ? void 0 : bondData.tags) === null || _b === void 0 ? void 0 : _b[0] })] }), jsxs(Flex, { className: "title-container price-container", children: [jsxs(Flex, { className: "price-container price", children: ["$", earnTokenPrice(bondData)] }), jsxs(Flex, { className: "price-container discounted", children: ["$", discountEarnTokenPrice(bondData)] })] }), jsx$2(Flex, { className: "slipagge-close-icons", children: onDismiss ? (jsxs(Fragment$1, { children: [showProjectInfoButton && jsx$2(ExpandedViewButton, { handleNavigation: handleProjectViewNavigation }), jsx$2(IconButton, { icon: "close", color: "text", variant: "transparent", onClick: handleClose }), jsx$2(Flex, { sx: { py: '3px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: "16px" }) })] })) : (jsx$2(Flex, { sx: { py: '3px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: "16px" }) })) })] }));
74052
+ return (jsxs(Flex, { className: "modaltable-container title-container", children: [jsx$2(Flex, { className: "title-container bondicon", children: jsx$2(TokenImage, { symbol: (_a = bondData.showcaseTokenName) !== null && _a !== void 0 ? _a : bondData.earnToken.symbol, size: 50, chain: bondData.chainId }) }), jsxs(Flex, { className: "title-container bondname", children: [bondData === null || bondData === void 0 ? void 0 : bondData.showcaseTokenName, jsx$2(ListTag, { text: (_b = bondData === null || bondData === void 0 ? void 0 : bondData.tags) === null || _b === void 0 ? void 0 : _b[0] })] }), jsxs(Flex, { className: "title-container price-container", children: [jsxs(Flex, { className: "price-container price", children: ["$", earnTokenPrice(bondData)] }), jsxs(Flex, { className: "price-container discounted", children: ["$", discountEarnTokenPrice(bondData)] })] }), jsx$2(Flex, { className: "slipagge-close-icons", children: onDismiss ? (jsxs(Fragment$1, { children: [showProjectInfoButton && jsx$2(ExpandedViewButton, { handleNavigation: handleProjectViewNavigation }), jsx$2(IconButton, { icon: "close", color: "text", variant: "transparent", onClick: handleClose }), jsx$2(Flex, { sx: { py: '3px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: "16px" }) })] })) : (jsx$2(Flex, { sx: { py: '3px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: "16px" }) })) })] }));
74069
74053
  };
74070
74054
 
74071
74055
  const BondCards = ({ bondData }) => {
@@ -74133,6 +74117,7 @@ const ProjectDescription = ({ description }) => {
74133
74117
  };
74134
74118
 
74135
74119
  const BondModalHeaderAlt = ({ bondData, onDismiss, showProjectInfoButton, }) => {
74120
+ var _a, _b, _c, _d, _e, _f;
74136
74121
  const [onOpenSlippageModal] = useModal(jsx$2(SlippageModal, {}));
74137
74122
  const handleClose = () => {
74138
74123
  if (typeof window !== 'undefined') {
@@ -74152,7 +74137,7 @@ const BondModalHeaderAlt = ({ bondData, onDismiss, showProjectInfoButton, }) =>
74152
74137
  // },
74153
74138
  // })
74154
74139
  // }
74155
- return (jsx$2(Flex, { className: "modaltable-container title-container", children: jsx$2(Flex, { className: "slipagge-close-icons", sx: { flexDirection: 'row' }, children: onDismiss ? (jsxs(Fragment$1, { children: [jsx$2(Flex, { sx: { pr: '10px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: "16px" }) }), jsx$2(IconButton, { icon: "close", color: "text", variant: "transparent", onClick: handleClose })] })) : (jsx$2(Flex, { sx: {}, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: "16px" }) })) }) }));
74140
+ return (jsx$2(Flex, { className: "modaltable-container title-container", children: jsx$2(Flex, { className: "slipagge-close-icons", sx: { flexDirection: 'row' }, children: onDismiss ? (jsxs(Fragment$1, { children: [jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(BondInfoTooltip, { earnTokenContract: (_c = (_b = (_a = bondData === null || bondData === void 0 ? void 0 : bondData.earnToken) === null || _a === void 0 ? void 0 : _a.address) === null || _b === void 0 ? void 0 : _b[bondData === null || bondData === void 0 ? void 0 : bondData.chainId]) !== null && _c !== void 0 ? _c : '', earnTokenSymbol: (_e = (_d = bondData === null || bondData === void 0 ? void 0 : bondData.earnToken) === null || _d === void 0 ? void 0 : _d.symbol) !== null && _e !== void 0 ? _e : '', bondContract: (_f = bondData.billAddress) !== null && _f !== void 0 ? _f : '', projectLink: bondData === null || bondData === void 0 ? void 0 : bondData.projectLink, twitter: bondData === null || bondData === void 0 ? void 0 : bondData.twitter, audit: bondData === null || bondData === void 0 ? void 0 : bondData.audit, chain: bondData === null || bondData === void 0 ? void 0 : bondData.chainId }), width: "205px", placement: "bottomRight", transformTip: "translate(7%, -2%)", children: jsx$2(Flex, { className: "more-icon", sx: { opacity: 0.8 }, children: jsx$2(Svg, { icon: "more", width: "25px" }) }) }), jsx$2(Flex, { sx: { pr: '10px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: "16px" }) }), jsx$2(IconButton, { icon: "close", color: "text", variant: "transparent", onClick: handleClose })] })) : (jsx$2(Flex, { sx: {}, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: "16px" }) })) }) }));
74156
74141
  };
74157
74142
 
74158
74143
  const ImageAndShortDescription = ({ bondData, onDismiss }) => {
@@ -74193,415 +74178,32 @@ const ImageAndShortDescription = ({ bondData, onDismiss }) => {
74193
74178
  }) })] }), jsxs(Flex, { sx: { alignItems: 'center', display: ['flex', 'flex', 'flex', 'none'], p: '10px', width: '100%' }, children: [jsxs(Flex, { sx: { width: ['50%', '50%', '50%', '100%'], alignItems: 'center' }, children: [jsx$2(Flex, { sx: { mr: '5px' }, children: jsx$2(TokenImage, { symbol: (_a = bondData.showcaseTokenName) !== null && _a !== void 0 ? _a : bondData.earnToken.symbol, size: 30, chain: bondData.chainId }) }), jsxs("h2", { className: "modal-tokenname-chainicon", sx: { margin: '0px' }, children: [bondData === null || bondData === void 0 ? void 0 : bondData.showcaseTokenName, ' '] })] }), jsx$2(Flex, { className: "modal-marketprice-header", sx: { justifyContent: 'flex-end', alignItems: 'center' }, children: jsxs("span", { className: "modal-marketprice", children: ["Market Price: $", earnTokenPrice(bondData)] }) }), jsx$2(Flex, { className: "bondmodal-header-alt", sx: { mb: '10px' }, children: jsx$2(BondModalHeaderAlt, { bondData: bondData, onDismiss: onDismiss, showProjectInfoButton: (SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.referenceId) === 'apebond' }) })] }), jsx$2(Flex, { className: "description-container paragraph-spaced", sx: { px: '10px', opacity: 0.7, mt: ['0', '0', '0', '10px'] }, children: jsx$2(ProjectDescription, { description: bondData === null || bondData === void 0 ? void 0 : bondData.shortDescription }) })] }));
74194
74179
  };
74195
74180
 
74196
- var lensContractABI = [
74197
- {
74198
- inputs: [
74199
- ],
74200
- stateMutability: "nonpayable",
74201
- type: "constructor"
74202
- },
74203
- {
74204
- inputs: [
74205
- ],
74206
- name: "DurationsNotDescendingOrder",
74207
- type: "error"
74208
- },
74209
- {
74210
- inputs: [
74211
- ],
74212
- name: "MismatchedLengths",
74213
- type: "error"
74214
- },
74215
- {
74216
- inputs: [
74217
- ],
74218
- name: "MultiplierBelowPrecision",
74219
- type: "error"
74220
- },
74221
- {
74222
- inputs: [
74223
- ],
74224
- name: "NotLockOwner",
74225
- type: "error"
74226
- },
74227
- {
74228
- anonymous: false,
74229
- inputs: [
74230
- {
74231
- indexed: false,
74232
- internalType: "uint8",
74233
- name: "version",
74234
- type: "uint8"
74235
- }
74236
- ],
74237
- name: "Initialized",
74238
- type: "event"
74239
- },
74240
- {
74241
- anonymous: false,
74242
- inputs: [
74243
- {
74244
- indexed: false,
74245
- internalType: "uint256[]",
74246
- name: "durationThresholds",
74247
- type: "uint256[]"
74248
- },
74249
- {
74250
- indexed: false,
74251
- internalType: "uint256[]",
74252
- name: "multipliers",
74253
- type: "uint256[]"
74254
- }
74255
- ],
74256
- name: "MultipliersUpdated",
74257
- type: "event"
74258
- },
74259
- {
74260
- anonymous: false,
74261
- inputs: [
74262
- {
74263
- indexed: true,
74264
- internalType: "address",
74265
- name: "previousOwner",
74266
- type: "address"
74267
- },
74268
- {
74269
- indexed: true,
74270
- internalType: "address",
74271
- name: "newOwner",
74272
- type: "address"
74273
- }
74274
- ],
74275
- name: "OwnershipTransferred",
74276
- type: "event"
74277
- },
74278
- {
74279
- inputs: [
74280
- ],
74281
- name: "MULTIPLIER_PRECISION",
74282
- outputs: [
74283
- {
74284
- internalType: "uint256",
74285
- name: "",
74286
- type: "uint256"
74287
- }
74288
- ],
74289
- stateMutability: "view",
74290
- type: "function"
74291
- },
74292
- {
74293
- inputs: [
74294
- {
74295
- internalType: "uint256",
74296
- name: "",
74297
- type: "uint256"
74298
- }
74299
- ],
74300
- name: "durationDaysThresholds",
74301
- outputs: [
74302
- {
74303
- internalType: "uint256",
74304
- name: "",
74305
- type: "uint256"
74306
- }
74307
- ],
74308
- stateMutability: "view",
74309
- type: "function"
74310
- },
74311
- {
74312
- inputs: [
74313
- {
74314
- internalType: "address",
74315
- name: "escrowOwner",
74316
- type: "address"
74317
- }
74318
- ],
74319
- name: "getEscrowWeight",
74320
- outputs: [
74321
- {
74322
- internalType: "uint256",
74323
- name: "totalWeight",
74324
- type: "uint256"
74325
- },
74326
- {
74327
- internalType: "uint256",
74328
- name: "maxMultiplier",
74329
- type: "uint256"
74330
- },
74331
- {
74332
- internalType: "uint256",
74333
- name: "maxTier",
74334
- type: "uint256"
74335
- }
74336
- ],
74337
- stateMutability: "view",
74338
- type: "function"
74339
- },
74340
- {
74341
- inputs: [
74342
- {
74343
- internalType: "address",
74344
- name: "escrowOwner",
74345
- type: "address"
74346
- },
74347
- {
74348
- internalType: "uint256[]",
74349
- name: "tokenIds",
74350
- type: "uint256[]"
74351
- }
74352
- ],
74353
- name: "getEscrowWeightForTokenIds",
74354
- outputs: [
74355
- {
74356
- internalType: "uint256",
74357
- name: "totalWeight",
74358
- type: "uint256"
74359
- },
74360
- {
74361
- internalType: "uint256",
74362
- name: "maxMultiplier",
74363
- type: "uint256"
74364
- },
74365
- {
74366
- internalType: "uint256",
74367
- name: "maxTier",
74368
- type: "uint256"
74369
- }
74370
- ],
74371
- stateMutability: "view",
74372
- type: "function"
74373
- },
74374
- {
74375
- inputs: [
74376
- {
74377
- internalType: "uint256",
74378
- name: "durationDays",
74379
- type: "uint256"
74380
- }
74381
- ],
74382
- name: "getMultiplierForDaysLocked",
74383
- outputs: [
74384
- {
74385
- internalType: "uint256",
74386
- name: "multiplier",
74387
- type: "uint256"
74388
- },
74389
- {
74390
- internalType: "uint256",
74391
- name: "tier",
74392
- type: "uint256"
74393
- }
74394
- ],
74395
- stateMutability: "view",
74396
- type: "function"
74397
- },
74398
- {
74399
- inputs: [
74400
- ],
74401
- name: "getMultipliers",
74402
- outputs: [
74403
- {
74404
- internalType: "uint256[]",
74405
- name: "_durationDaysThresholds",
74406
- type: "uint256[]"
74407
- },
74408
- {
74409
- internalType: "uint256[]",
74410
- name: "_multipliers",
74411
- type: "uint256[]"
74412
- }
74413
- ],
74414
- stateMutability: "view",
74415
- type: "function"
74416
- },
74417
- {
74418
- inputs: [
74419
- {
74420
- internalType: "address",
74421
- name: "_votingEscrowAddress",
74422
- type: "address"
74423
- },
74424
- {
74425
- internalType: "uint256[]",
74426
- name: "_durationDaysThresholds",
74427
- type: "uint256[]"
74428
- },
74429
- {
74430
- internalType: "uint256[]",
74431
- name: "_multipliers",
74432
- type: "uint256[]"
74433
- }
74434
- ],
74435
- name: "initialize",
74436
- outputs: [
74437
- ],
74438
- stateMutability: "nonpayable",
74439
- type: "function"
74440
- },
74441
- {
74442
- inputs: [
74443
- {
74444
- internalType: "uint256",
74445
- name: "",
74446
- type: "uint256"
74447
- }
74448
- ],
74449
- name: "multipliers",
74450
- outputs: [
74451
- {
74452
- internalType: "uint256",
74453
- name: "",
74454
- type: "uint256"
74455
- }
74456
- ],
74457
- stateMutability: "view",
74458
- type: "function"
74459
- },
74460
- {
74461
- inputs: [
74462
- ],
74463
- name: "owner",
74464
- outputs: [
74465
- {
74466
- internalType: "address",
74467
- name: "",
74468
- type: "address"
74469
- }
74470
- ],
74471
- stateMutability: "view",
74472
- type: "function"
74473
- },
74474
- {
74475
- inputs: [
74476
- ],
74477
- name: "renounceOwnership",
74478
- outputs: [
74479
- ],
74480
- stateMutability: "nonpayable",
74481
- type: "function"
74482
- },
74483
- {
74484
- inputs: [
74485
- {
74486
- internalType: "uint256[]",
74487
- name: "_durationDaysThresholds",
74488
- type: "uint256[]"
74489
- },
74490
- {
74491
- internalType: "uint256[]",
74492
- name: "_multipliers",
74493
- type: "uint256[]"
74494
- }
74495
- ],
74496
- name: "setMultipliers",
74497
- outputs: [
74498
- ],
74499
- stateMutability: "nonpayable",
74500
- type: "function"
74501
- },
74502
- {
74503
- inputs: [
74504
- {
74505
- internalType: "address",
74506
- name: "newOwner",
74507
- type: "address"
74508
- }
74509
- ],
74510
- name: "transferOwnership",
74511
- outputs: [
74512
- ],
74513
- stateMutability: "nonpayable",
74514
- type: "function"
74515
- },
74516
- {
74517
- inputs: [
74518
- ],
74519
- name: "votingEscrow",
74520
- outputs: [
74521
- {
74522
- internalType: "contract IVotingEscrowV2Upgradeable",
74523
- name: "",
74524
- type: "address"
74525
- }
74526
- ],
74527
- stateMutability: "view",
74528
- type: "function"
74529
- }
74530
- ];
74531
-
74532
- const TIERS_WEIGHT = {
74533
- [types.LaunchBondTiers.Bronze]: '1000000000000000000000',
74534
- [types.LaunchBondTiers.Silver]: '10000000000000000000000',
74535
- [types.LaunchBondTiers.Gold]: '25000000000000000000000',
74536
- [types.LaunchBondTiers.Diamond]: '100000000000000000000000',
74537
- [types.LaunchBondTiers.Legend]: '500000000000000000000000',
74538
- };
74539
- const TIERS_NAMES = {
74540
- [types.LaunchBondTiers.Bronze]: 'Bronze',
74541
- [types.LaunchBondTiers.Silver]: 'Silver',
74542
- [types.LaunchBondTiers.Gold]: 'Gold',
74543
- [types.LaunchBondTiers.Diamond]: 'Diamond',
74544
- [types.LaunchBondTiers.Legend]: 'Legend',
74545
- };
74546
- const getUserTier = (weight) => {
74547
- const weightBG = new BigNumber$1(weight);
74548
- const bronze = new BigNumber$1(TIERS_WEIGHT[types.LaunchBondTiers.Bronze]);
74549
- const silver = new BigNumber$1(TIERS_WEIGHT[types.LaunchBondTiers.Silver]);
74550
- const gold = new BigNumber$1(TIERS_WEIGHT[types.LaunchBondTiers.Gold]);
74551
- const diamond = new BigNumber$1(TIERS_WEIGHT[types.LaunchBondTiers.Diamond]);
74552
- const legend = new BigNumber$1(TIERS_WEIGHT[types.LaunchBondTiers.Legend]);
74553
- if (weightBG.gte(legend)) {
74554
- return types.LaunchBondTiers.Legend;
74555
- }
74556
- else if (weightBG.gte(diamond)) {
74557
- return types.LaunchBondTiers.Diamond;
74558
- }
74559
- else if (weightBG.gte(gold)) {
74560
- return types.LaunchBondTiers.Gold;
74561
- }
74562
- else if (weightBG.gte(silver)) {
74563
- return types.LaunchBondTiers.Silver;
74564
- }
74565
- else if (weightBG.gte(bronze)) {
74566
- return types.LaunchBondTiers.Bronze;
74567
- }
74568
- else
74569
- return null;
74570
- };
74571
- const fetchEscrowWeight = (account) => __awaiter$9(void 0, void 0, void 0, function* () {
74572
- const lensContractAddress = LENS_CONTRACT[types.ChainId.BSC];
74573
- if (account) {
74574
- try {
74575
- const res = yield multicall(types.ChainId.BSC, lensContractABI, [
74576
- {
74577
- address: lensContractAddress,
74578
- name: 'getEscrowWeight',
74579
- params: [account],
74580
- },
74581
- ]);
74582
- return res[0][0].toString();
74583
- }
74584
- catch (e) {
74585
- console.error(e);
74586
- return '0';
74587
- }
74588
- }
74589
- else
74590
- return null;
74181
+ // Fetch country code to check if the region is allowed
74182
+ const fetchLocation = (apiv2URL) => __awaiter$9(void 0, void 0, void 0, function* () {
74183
+ const resp = yield axios.get(`${apiv2URL}/check`);
74184
+ const { isRestrictedRegion, countryCode } = resp === null || resp === void 0 ? void 0 : resp.data;
74185
+ return { isRestrictedRegion, countryCode };
74591
74186
  });
74592
- function useGetUserEscrowWeight(account) {
74187
+ function useGeoFencing() {
74188
+ const apiv2URL = useURLByEnvironment('apiV2');
74593
74189
  return useQuery({
74594
- queryKey: [`${QUERY_KEYS.TIERS}-${account}`],
74595
- queryFn: () => fetchEscrowWeight(account),
74596
- staleTime: 60000,
74597
- refetchInterval: 30000, // i.e. 30 secs
74190
+ queryKey: [QUERY_KEYS.GEO_FENCING],
74191
+ queryFn: () => fetchLocation(apiv2URL),
74192
+ staleTime: Infinity,
74193
+ refetchOnMount: false,
74598
74194
  refetchOnWindowFocus: false,
74599
74195
  });
74600
74196
  }
74601
74197
 
74198
+ const RestrictedRegionModal = ({ onDismiss }) => {
74199
+ const { data: geoData } = useGeoFencing();
74200
+ return (jsxs(Modal, { className: "modal", title: "Notice", sx: { maxWidth: '200px' }, children: [jsxs(Flex, { sx: { my: '20px' }, children: ["Unfortunately, this bond is restricted for your region: ", geoData === null || geoData === void 0 ? void 0 : geoData.countryCode, "."] }), jsx$2(Button, { fullWidth: true, onClick: onDismiss, children: "Close" })] }));
74201
+ };
74202
+
74602
74203
  const BondModal = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond }) => {
74603
74204
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
74604
74205
  const SDKConfig = useSDKConfig();
74206
+ const { data: geoData } = useGeoFencing();
74605
74207
  // State
74606
74208
  const [modalVariant, setModalVariant] = useState(SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.modalVariant);
74607
74209
  const [accordionVisible, setAccordionVisible] = useState(false);
@@ -74613,11 +74215,8 @@ const BondModal = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond }) =
74613
74215
  const { sendTransactionAsync } = useSendTransaction();
74614
74216
  const { data: bonds } = useBondsData();
74615
74217
  const sendReferenceId = useSendReferenceId();
74616
- const { data: userEscrowWeight } = useGetUserEscrowWeight(account);
74617
- const userTier = getUserTier(userEscrowWeight !== null && userEscrowWeight !== void 0 ? userEscrowWeight : '0');
74618
74218
  // State
74619
74219
  const bondData = useMemo(() => bonds === null || bonds === void 0 ? void 0 : bonds.find((bond) => { var _a; return ((_a = bond === null || bond === void 0 ? void 0 : bond.billAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === (bondAddress === null || bondAddress === void 0 ? void 0 : bondAddress.toLowerCase()); }), [bondAddress]);
74620
- const isXmasStyle = (bondData === null || bondData === void 0 ? void 0 : bondData.minTier) ? bondData.minTier : null;
74621
74220
  const [buyTxHash, setBuyTxHash] = useState();
74622
74221
  const [inputValue, setInputValue] = useState('');
74623
74222
  const [inputTokenString, setInputTokenString] = useState((_c = (_b = (_a = bondData === null || bondData === void 0 ? void 0 : bondData.lpToken) === null || _a === void 0 ? void 0 : _a.address) === null || _b === void 0 ? void 0 : _b[bondData.chainId]) !== null && _c !== void 0 ? _c : 'NATIVE');
@@ -74772,13 +74371,26 @@ const BondModal = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond }) =
74772
74371
  }
74773
74372
  }
74774
74373
  });
74374
+ const [openGeofencingModal] = useModal(jsx$2(RestrictedRegionModal, {}));
74375
+ const blockedBondsForAE = [
74376
+ '0x0719CCaF2f07f59b23DB7d80E3d2791A0836bdfD'.toLowerCase(),
74377
+ '0xBc48794a04777E7170bD5633E8b728f8a0945971'.toLowerCase(),
74378
+ '0x94A283756B70c2A77bc58Ae0E2615Caf14310186'.toLowerCase(),
74379
+ '0x6639D4acAe77967c253C75cBfEd7C612682E2704'.toLowerCase(),
74380
+ ];
74775
74381
  const handleBothPurchases = () => {
74776
- setLoadingTx(true);
74777
- if (isZap) {
74778
- handleZapCallback().finally(() => setLoadingTx(false));
74382
+ var _a, _b;
74383
+ if ((geoData === null || geoData === void 0 ? void 0 : geoData.countryCode) === 'AE' && blockedBondsForAE.includes((_b = (_a = bondData === null || bondData === void 0 ? void 0 : bondData.billAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== null && _b !== void 0 ? _b : '')) {
74384
+ openGeofencingModal();
74779
74385
  }
74780
74386
  else {
74781
- handleBuyCallback().finally(() => setLoadingTx(false));
74387
+ setLoadingTx(true);
74388
+ if (isZap) {
74389
+ handleZapCallback().finally(() => setLoadingTx(false));
74390
+ }
74391
+ else {
74392
+ handleBuyCallback().finally(() => setLoadingTx(false));
74393
+ }
74782
74394
  }
74783
74395
  };
74784
74396
  const openExternal = () => {
@@ -74792,7 +74404,7 @@ const BondModal = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond }) =
74792
74404
  window.open(`https://ape.bond/swap?outputcurrency=${bondData === null || bondData === void 0 ? void 0 : bondData.lpToken.address[bondData === null || bondData === void 0 ? void 0 : bondData.chainId]}&outputChain=${bondData === null || bondData === void 0 ? void 0 : bondData.chainId}`, '_blank');
74793
74405
  }
74794
74406
  };
74795
- return (jsx$2(Modal, { className: `modal ${isXmasStyle ? 'xmas-style' : ''}`, onDismiss: onDismiss, children: modalVariant === 'standard' ? (jsx$2(Fragment$1, { children: bondData && (jsxs(Flex, { className: "modal-content", children: [typeof window !== 'undefined' && window.location.origin === 'http://localhost:5173' && (jsxs(Text, { sx: { borderBottom: '1px solid white', fontSize: '14px', mb: '10px' }, children: ["Dev mode - Current view: \"standard\"", jsx$2(Text, { onClick: () => setModalVariant('alt'), sx: { ml: '15px', textDecoration: 'underline', cursor: 'pointer' }, children: "Switch view" })] })), jsxs(Flex, { className: "modaltable-container", children: [jsx$2(BondModalHeader, { bondData: bondData, onDismiss: onDismiss, showProjectInfoButton: (SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.referenceId) === 'apebond' }), jsx$2(ProjectDescription, { description: bondData.shortDescription }), jsx$2(BondCards, { bondData: bondData }), jsx$2(Estimations, { bondData: bondData, inputValue: inputValue, inputToken: inputToken, estimatedOutput: estimatedOutput, inputTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price, isZap: isZap, fetchingZapQuote: fetchingZapQuote, zapError: zapError }), jsx$2(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleValueBtn: () => { var _a; return setInputValue((_a = new BigNumber$1(inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, handleCurrencySelect: handleCurrencySelect, chainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId, enableZap: supportedByLIFI.includes(bondData === null || bondData === void 0 ? void 0 : bondData.chainId), bondPrincipalToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, tokenBalance: inputCurrencyBalance, selectedTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price }), bondData.type === 'staking' && (jsxs(Flex, { sx: {
74407
+ return (jsx$2(Modal, { className: "modal", onDismiss: onDismiss, children: modalVariant === 'standard' ? (jsx$2(Fragment$1, { children: bondData && (jsxs(Flex, { className: "modal-content", children: [typeof window !== 'undefined' && window.location.origin === 'http://localhost:5173' && (jsxs(Text, { sx: { borderBottom: '1px solid white', fontSize: '14px', mb: '10px' }, children: ["Dev mode - Current view: \"standard\"", jsx$2(Text, { onClick: () => setModalVariant('alt'), sx: { ml: '15px', textDecoration: 'underline', cursor: 'pointer' }, children: "Switch view" })] })), jsxs(Flex, { className: "modaltable-container", children: [jsx$2(BondModalHeader, { bondData: bondData, onDismiss: onDismiss, showProjectInfoButton: (SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.referenceId) === 'apebond' }), jsx$2(ProjectDescription, { description: bondData.shortDescription }), jsx$2(BondCards, { bondData: bondData }), jsx$2(Estimations, { bondData: bondData, inputValue: inputValue, inputToken: inputToken, estimatedOutput: estimatedOutput, inputTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price, isZap: isZap, fetchingZapQuote: fetchingZapQuote, zapError: zapError }), jsx$2(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleValueBtn: () => { var _a; return setInputValue((_a = new BigNumber$1(inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, handleCurrencySelect: handleCurrencySelect, chainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId, enableZap: supportedByLIFI.includes(bondData === null || bondData === void 0 ? void 0 : bondData.chainId), bondPrincipalToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, tokenBalance: inputCurrencyBalance, selectedTokenPrice: inputTokenPrice === null || inputTokenPrice === void 0 ? void 0 : inputTokenPrice.price }), bondData.type === 'staking' && (jsxs(Flex, { sx: {
74796
74408
  p: '5px 10px',
74797
74409
  width: '100%',
74798
74410
  background: '#8E568F',
@@ -74802,21 +74414,10 @@ const BondModal = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond }) =
74802
74414
  fontWeight: 400,
74803
74415
  justifyContent: 'center',
74804
74416
  display: 'block',
74805
- }, children: ["Tokens bought through this bond will go directly to the", ' ', jsx$2("span", { onClick: () => window.open('https://basepad.finance/earn', '_blank'), style: { textDecoration: 'underline', cursor: 'pointer', color: 'blue' }, children: "$BPAD staking pool" }), ' ', "with a ", daysLeftOnBasepadPool(), " days lock."] })), isXmasStyle && (bondData === null || bondData === void 0 ? void 0 : bondData.minTier) !== undefined && (jsxs(Flex, { sx: {
74806
- p: '5px 10px',
74807
- width: '100%',
74808
- background: '#DF4141',
74809
- borderRadius: 'normal',
74810
- mt: '10px',
74811
- fontSize: '12px',
74812
- fontWeight: 400,
74813
- justifyContent: 'center',
74814
- textAlign: 'center',
74815
- display: 'block',
74816
- }, children: ["This is a special ", jsx$2("span", { style: { fontWeight: 700 }, children: "Christmas Flash Bond." }), " In order to buy it, you need a", ' ', jsxs("span", { style: { fontWeight: 700 }, children: [TIERS_NAMES[bondData === null || bondData === void 0 ? void 0 : bondData.minTier], " Ape Tier"] }), ' ', (bondData === null || bondData === void 0 ? void 0 : bondData.minTier) !== 4 && 'or better'] })), jsxs(Flex, { className: "modaltable-container button-container", children: [jsx$2(Flex, { className: "button-container get", children: jsxs(Button, { className: "action-button", onClick: () => supportedByLIFI.includes(bondData === null || bondData === void 0 ? void 0 : bondData.chainId) ? handleOpenZapModal() : openExternal(), variant: "secondary", children: ["Get ", getSymbol(bondData === null || bondData === void 0 ? void 0 : bondData.lpToken)] }) }), jsx$2(Flex, { className: "button-container buy", children: !account ? (jsx$2(ConnectButton, {})) : userChainId !== bondData.chainId ? (jsx$2(Button, { className: "switch-button", disabled: loadingTx || isConfirming || (bondData === null || bondData === void 0 ? void 0 : bondData.soldOut), onClick: (event) => {
74417
+ }, children: ["Tokens bought through this bond will go directly to the", ' ', jsx$2("span", { onClick: () => window.open('https://basepad.finance/earn', '_blank'), style: { textDecoration: 'underline', cursor: 'pointer', color: 'blue' }, children: "$BPAD staking pool" }), ' ', "with a ", daysLeftOnBasepadPool(), " days lock."] })), jsxs(Flex, { className: "modaltable-container button-container", children: [jsx$2(Flex, { className: "button-container get", children: jsxs(Button, { className: "action-button", onClick: () => supportedByLIFI.includes(bondData === null || bondData === void 0 ? void 0 : bondData.chainId) ? handleOpenZapModal() : openExternal(), variant: "secondary", children: ["Get ", getSymbol(bondData === null || bondData === void 0 ? void 0 : bondData.lpToken)] }) }), jsx$2(Flex, { className: "button-container buy", children: !account ? (jsx$2(ConnectButton, {})) : userChainId !== bondData.chainId ? (jsx$2(Button, { className: "switch-button", disabled: loadingTx || isConfirming || (bondData === null || bondData === void 0 ? void 0 : bondData.soldOut), onClick: (event) => {
74817
74418
  event.stopPropagation();
74818
74419
  switchChain({ chainId: bondData.chainId });
74819
- }, style: { fontSize: '14px', padding: '6px', marginLeft: '0px' }, children: `Switch to ${NETWORK_LABEL[bondData.chainId]}` })) : isXmasStyle && bondData.minTier && (!userTier || userTier < bondData.minTier) ? (jsx$2(Button, { className: "action-button", onClick: () => window.open(`https://www.ape.bond/tier-staking`, '_blank'), children: "GET YOUR TIER" })) : approvalState === ApprovalState.APPROVED ? (jsx$2(Button, { className: "action-button", load: load || fetchingZapQuote, disabled: load ||
74420
+ }, style: { fontSize: '14px', padding: '6px', marginLeft: '0px' }, children: `Switch to ${NETWORK_LABEL[bondData.chainId]}` })) : approvalState === ApprovalState.APPROVED ? (jsx$2(Button, { className: "action-button", load: load || fetchingZapQuote, disabled: load ||
74820
74421
  (bondData === null || bondData === void 0 ? void 0 : bondData.soldOut) ||
74821
74422
  !account ||
74822
74423
  !inputValue ||
@@ -74889,7 +74490,6 @@ const ModalHandler = ({ onDismiss, bondAddress, bondChain, }) => {
74889
74490
  const { data: userBonds, refetch } = useUserBonds();
74890
74491
  const userBill = userBonds === null || userBonds === void 0 ? void 0 : userBonds.find((bond) => bond.id === billId);
74891
74492
  useEffect(() => {
74892
- console.log(billId);
74893
74493
  if (billId) {
74894
74494
  console.log('BillId detected, Refetching user bonds');
74895
74495
  refetch();
@@ -75050,7 +74650,6 @@ const BondRow = ({ bond }) => {
75050
74650
  ? bond.contractAddress[bond.chainId]
75051
74651
  : undefined;
75052
74652
  const bonus = 'bonus' in bond ? bond.bonus : undefined;
75053
- const isXmasStyle = 'minTier' in bond ? bond.minTier : null;
75054
74653
  // Modal
75055
74654
  const [openBuyModal] = useModal(jsx$2(ModalHandler, { bondAddress: billAddress, bondChain: bond.chainId }), true, true, `buyBondModal-${billAddress}-${bond.chainId}`);
75056
74655
  const handleOpenModal = () => {
@@ -75088,7 +74687,7 @@ const BondRow = ({ bond }) => {
75088
74687
  const tokens = new BigNumber$1(tokensRemaining);
75089
74688
  return tokens.times(payoutTokenPrice);
75090
74689
  };
75091
- return (jsxs("div", { className: `bond-row ${isXmasStyle ? 'xmas-border' : ''}`, onClick: handleOpenModal, children: [jsxs("div", { className: "token-info-container", children: [isXmasStyle && jsx$2("img", { src: "./images/bills/xmasHat.png", alt: "xmas-hat", className: "xmas-hat" }), jsx$2(TokenInfoAndName, { bill: bond })] }), jsxs("div", { className: "bond-info-columns", children: [jsx$2("div", { className: `discount-column ${getDiscountColor(bonus)}`, children: bonus !== undefined ? `${bonus === null || bonus === void 0 ? void 0 : bonus.toFixed(2)}%` : '-' }), jsx$2("div", { className: "arr-column", children: calculateARR(bond) !== undefined ? calculateARR(bond) : '-' }), jsx$2("div", { className: "terms-column", children: bond.type === 'staking'
74690
+ return (jsxs("div", { className: "bond-row", onClick: handleOpenModal, children: [jsx$2("div", { className: "token-info-container", children: jsx$2(TokenInfoAndName, { bill: bond }) }), jsxs("div", { className: "bond-info-columns", children: [jsx$2("div", { className: `discount-column ${getDiscountColor(bonus)}`, children: bonus !== undefined ? `${bonus === null || bonus === void 0 ? void 0 : bonus.toFixed(2)}%` : '-' }), jsx$2("div", { className: "arr-column", children: calculateARR(bond) !== undefined ? calculateARR(bond) : '-' }), jsx$2("div", { className: "terms-column", children: bond.type === 'staking'
75092
74691
  ? `${daysLeftOnBasepadPool()} D Lock`
75093
74692
  : vestingTime((_a = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _a !== void 0 ? _a : 0).days
75094
74693
  ? `${vestingTime((_b = bond === null || bond === void 0 ? void 0 : bond.vestingTerm) !== null && _b !== void 0 ? _b : 0).days} D`
@@ -75217,7 +74816,7 @@ const BondRowsByChain = ({ bonds, hideTitles }) => {
75217
74816
  const SDKConfig = useSDKConfig();
75218
74817
  const validatedChains = (_a = SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.chains) === null || _a === void 0 ? void 0 : _a.filter((chain) => MAINNET_CHAINS.includes(chain));
75219
74818
  return (jsx$2(Flex$1, { className: "bondrowsbychain", children: validatedChains === null || validatedChains === void 0 ? void 0 : validatedChains.map((chain) => {
75220
- return (jsx$2(BondRowsWithTitle, { chain: chain, bonds: bonds, hideTitles: hideTitles, showHotBonds: SDKConfig.useHotBonds ? chain === types.ChainId.BASE || chain === types.ChainId.MAINNET : false }, chain));
74819
+ return (jsx$2(BondRowsWithTitle, { chain: chain, bonds: bonds, hideTitles: hideTitles, showHotBonds: hideTitles ? false : SDKConfig.useHotBonds ? chain === types.ChainId.BASE || chain === types.ChainId.MAINNET : false }, chain));
75221
74820
  }) }));
75222
74821
  };
75223
74822
 
@@ -75391,6 +74990,7 @@ const BondsMenu = ({ searchQuery, setSearchQuery, setChainFilterOption, chainFil
75391
74990
  const Bonds = () => {
75392
74991
  // Fetch data
75393
74992
  useHotBonds();
74993
+ useGeoFencing();
75394
74994
  const { favTokens } = useFavoriteTokens();
75395
74995
  const { data: bondData, refetch: refetchBondsData } = useBondsData();
75396
74996
  const { data: allBonds } = useBondsList();
@@ -91159,6 +90759,7 @@ const SalesTable = ({ allSales }) => {
91159
90759
  const receivedUsdAmount = ((_a = sale === null || sale === void 0 ? void 0 : sale.payout) !== null && _a !== void 0 ? _a : 0) * (sale === null || sale === void 0 ? void 0 : sale.payoutTokenPrice);
91160
90760
  const discount = 100 - (sale.dollarValue * 100) / receivedUsdAmount;
91161
90761
  const isUserTheBuyer = (buyer === null || buyer === void 0 ? void 0 : buyer.toLowerCase()) === (account === null || account === void 0 ? void 0 : account.toLowerCase());
90762
+ const payoutToken = sale.payoutToken === 'LL.e' ? 'LL' : sale.payoutToken;
91162
90763
  return (jsxs(Flex, { sx: {
91163
90764
  width: '100%',
91164
90765
  background: 'white3',
@@ -91169,7 +90770,7 @@ const SalesTable = ({ allSales }) => {
91169
90770
  alignItems: 'center',
91170
90771
  justifyContent: 'space-between',
91171
90772
  fontSize: '12px',
91172
- }, children: [jsxs(Flex, { sx: { width: '170px', alignItems: 'center' }, children: [jsx$2(Flex, { sx: { width: '30px', justifyContent: 'center' }, children: index + 4 }), jsx$2(TokenImage, { symbol: sale.payoutToken, chain: sale.chainId, size: 28 }), jsx$2(Flex, { sx: { ml: '10px' }, children: sale.payoutToken })] }), jsx$2(Flex, { sx: { width: '120px', justifyContent: 'center' }, children: formatUTCDate(new Date(sale.createdAt * 1000)) }), jsx$2(Flex, { sx: { width: '160px', justifyContent: 'center', position: 'relative' }, children: jsxs(Flex, { sx: { position: 'relative' }, children: [buyer === null || buyer === void 0 ? void 0 : buyer.slice(0, 4), "...", buyer === null || buyer === void 0 ? void 0 : buyer.slice((buyer === null || buyer === void 0 ? void 0 : buyer.length) - 4, buyer === null || buyer === void 0 ? void 0 : buyer.length), isUserTheBuyer && jsx$2(Flex, { sx: styles$1.youCard, children: "You" })] }) }), jsxs(Flex, { sx: { width: '110px', justifyContent: 'center' }, children: ["$", sale.dollarValue.toFixed(2)] }), jsxs(Flex, { sx: { width: '110px', justifyContent: 'center' }, children: ["$", receivedUsdAmount === null || receivedUsdAmount === void 0 ? void 0 : receivedUsdAmount.toFixed(2)] }), jsxs(Flex, { sx: { width: '85px', justifyContent: 'center', color: discount > 0 ? 'success' : 'error' }, children: [discount.toFixed(2), "%"] })] }, sale.transactionHash));
90773
+ }, children: [jsxs(Flex, { sx: { width: '170px', alignItems: 'center' }, children: [jsx$2(Flex, { sx: { width: '30px', justifyContent: 'center' }, children: index + 4 }), jsx$2(TokenImage, { symbol: payoutToken, chain: sale.chainId, size: 28 }), jsx$2(Flex, { sx: { ml: '10px' }, children: sale.payoutToken })] }), jsx$2(Flex, { sx: { width: '120px', justifyContent: 'center' }, children: formatUTCDate(new Date(sale.createdAt * 1000)) }), jsx$2(Flex, { sx: { width: '160px', justifyContent: 'center', position: 'relative' }, children: jsxs(Flex, { sx: { position: 'relative' }, children: [buyer === null || buyer === void 0 ? void 0 : buyer.slice(0, 4), "...", buyer === null || buyer === void 0 ? void 0 : buyer.slice((buyer === null || buyer === void 0 ? void 0 : buyer.length) - 4, buyer === null || buyer === void 0 ? void 0 : buyer.length), isUserTheBuyer && jsx$2(Flex, { sx: styles$1.youCard, children: "You" })] }) }), jsxs(Flex, { sx: { width: '110px', justifyContent: 'center' }, children: ["$", sale.dollarValue.toFixed(2)] }), jsxs(Flex, { sx: { width: '110px', justifyContent: 'center' }, children: ["$", receivedUsdAmount === null || receivedUsdAmount === void 0 ? void 0 : receivedUsdAmount.toFixed(2)] }), jsxs(Flex, { sx: { width: '85px', justifyContent: 'center', color: discount > 0 ? 'success' : 'error' }, children: [discount.toFixed(2), "%"] })] }, sale.transactionHash));
91173
90774
  }) })] }));
91174
90775
  };
91175
90776
 
@@ -0,0 +1,5 @@
1
+ import { UseQueryResult } from '@tanstack/react-query';
2
+ export default function useGeoFencing(): UseQueryResult<{
3
+ isRestrictedRegion: boolean;
4
+ countryCode: string;
5
+ }>;
package/dist/styles.css CHANGED
@@ -135,48 +135,6 @@
135
135
  width: fit-content !important;
136
136
  max-width: 95%;
137
137
  }
138
- .modal .xmas-hat {
139
- display: none;
140
- }
141
- .modal .xmas-tag {
142
- display: none;
143
- }
144
-
145
- .modal.xmas-style {
146
- background: rgb(31, 44, 56);
147
- }
148
- .modal.xmas-style .title-container.bondicon .xmas-hat {
149
- display: block;
150
- position: absolute;
151
- z-index: 9;
152
- left: 13px;
153
- top: -18px;
154
- }
155
- .modal.xmas-style .title-container.bondname {
156
- display: block;
157
- }
158
- .modal.xmas-style .title-container.bondname .list-tag {
159
- background: #DF4141;
160
- color: white;
161
- }
162
- .modal.xmas-style .modal-content {
163
- background: url("./images/bills/xmasRowBG.png");
164
- background-size: contain;
165
- }
166
- .modal.xmas-style .modal-content .bond-card-block, .modal.xmas-style .modal-content .token-selector-panel {
167
- background-color: rgb(38, 51, 63);
168
- }
169
- .modal.xmas-style .modal-content .input-container.token {
170
- background-color: rgb(45, 58, 71);
171
- }
172
- .modal.xmas-style .hide-mobile {
173
- display: none;
174
- }
175
- @media screen and (min-width: 800px) {
176
- .modal.xmas-style .hide-mobile {
177
- display: flex;
178
- }
179
- }
180
138
 
181
139
  .project-image {
182
140
  border-radius: 6px;
@@ -227,7 +185,6 @@
227
185
  display: flex;
228
186
  flex-direction: row;
229
187
  align-items: center;
230
- position: relative;
231
188
  }
232
189
 
233
190
  .icon-container {
@@ -671,18 +628,6 @@ span.flex-inline {
671
628
  min-height: 92px;
672
629
  }
673
630
 
674
- .show-alert-tier-xmas {
675
- padding: 5px 10px;
676
- width: 100%;
677
- background: #DF4141;
678
- border-radius: 4px;
679
- margin-top: 10px !important;
680
- font-size: 12px;
681
- font-weight: 400;
682
- justify-content: center;
683
- text-align: center;
684
- }
685
-
686
631
  .bond-row {
687
632
  display: flex;
688
633
  flex-direction: row;
@@ -700,13 +645,6 @@ span.flex-inline {
700
645
  .bond-row .token-info-container {
701
646
  display: flex;
702
647
  width: 40%;
703
- position: relative;
704
- }
705
- .bond-row .token-info-container .xmas-hat {
706
- position: absolute;
707
- z-index: 9;
708
- left: 25px;
709
- top: 3px;
710
648
  }
711
649
  .bond-row .bond-info-columns {
712
650
  display: flex;
@@ -764,15 +702,6 @@ span.flex-inline {
764
702
  display: flex;
765
703
  }
766
704
 
767
- .bond-row.xmas-border {
768
- background: url("./images/bills/xmasRowBG.png");
769
- background-color: rgb(31, 44, 56);
770
- }
771
- .bond-row.xmas-border .tokeninfoname.container .list-tag {
772
- background: #DF4141;
773
- color: white;
774
- }
775
-
776
705
  .column.column-tokens {
777
706
  display: flex;
778
707
  align-items: center;
@@ -27,5 +27,4 @@ export interface BondsData {
27
27
  audit?: string;
28
28
  earnToken: Token;
29
29
  lpToken: Token;
30
- minTier?: number;
31
30
  }
@@ -12,6 +12,7 @@ export declare const vestingTimeRemaining: (userBill: UserBill) => {
12
12
  minutes: number;
13
13
  seconds: number;
14
14
  };
15
+ export declare const vestingTimeRemainingYourBonds: (userBill: UserBill) => number;
15
16
  export declare const discountEarnTokenPrice: (bond: BondsData) => string;
16
17
  export declare const maxBuy: (bond: BondsData) => 0 | BigNumber;
17
18
  export declare function formatNumber(input: string): string;
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": "2.4.1",
6
+ "version": "2.5.1",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",
@@ -56,7 +56,7 @@
56
56
  "yalc": "^1.0.0-pre.53"
57
57
  },
58
58
  "dependencies": {
59
- "@ape.swap/apeswap-lists": "3.71.69",
59
+ "@ape.swap/apeswap-lists": "3.73.1",
60
60
  "@emotion/react": "11.11.4",
61
61
  "bignumber.js": "^9.1.2",
62
62
  "chart.js": "4.2.0",
@@ -1,11 +0,0 @@
1
- import { LaunchBondTiers } from '@ape.swap/apeswap-lists';
2
- export declare const TIERS_NAMES: {
3
- 0: string;
4
- 1: string;
5
- 2: string;
6
- 3: string;
7
- 4: string;
8
- };
9
- export declare const getUserTier: (weight: string) => LaunchBondTiers | null;
10
- export declare const fetchEscrowWeight: (account?: string) => Promise<string | null>;
11
- export default function useGetUserEscrowWeight(account?: string): import("@tanstack/react-query").UseQueryResult<string | null, Error>;