@ape.swap/bonds-sdk 2.1.0 → 2.1.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.
package/dist/main.js CHANGED
@@ -71189,18 +71189,20 @@ function useUserBonds() {
71189
71189
  // First fetch the full list of bonds
71190
71190
  const { data: bondList } = useBondsList();
71191
71191
  const { address } = useAccount();
71192
+ const SDKConfig = useSDKConfig();
71193
+ const chains = SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.chains;
71192
71194
  // Once the full list is fetched, fetch user's purchased bonds
71193
71195
  return useQuery({
71194
71196
  queryKey: [QUERY_KEYS.USER_BONDS, address],
71195
- queryFn: () => getUserBonds(address, bondList),
71197
+ queryFn: () => getUserBonds(address, bondList, chains),
71196
71198
  refetchOnWindowFocus: false,
71197
71199
  refetchInterval: 60000,
71198
71200
  enabled: !!bondList && !!address,
71199
71201
  });
71200
71202
  }
71201
- const getUserBonds = (account, bondList) => __awaiter$9(void 0, void 0, void 0, function* () {
71203
+ const getUserBonds = (account, bondList, chains) => __awaiter$9(void 0, void 0, void 0, function* () {
71202
71204
  try {
71203
- const results = yield Promise.allSettled(MAINNET_CHAINS.map((chain) => fetchUserOwnedBillsDataAsync(chain, account, bondList)));
71205
+ const results = yield Promise.allSettled(chains.map((chain) => fetchUserOwnedBillsDataAsync(chain, account, bondList)));
71204
71206
  // Filter out only fulfilled promises
71205
71207
  const fulfilledResults = results
71206
71208
  .filter((result) => result.status === 'fulfilled')
@@ -71321,7 +71323,12 @@ const MenuSelect = (_a) => {
71321
71323
  };
71322
71324
 
71323
71325
  const NetworkFilter = ({ chainFilterOption, setChainFilterOption, }) => {
71326
+ // Hooks
71327
+ const SDKConfig = useSDKConfig();
71328
+ const chains = SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.chains;
71329
+ // State
71324
71330
  const [isOpen, setIsOpen] = useState(false);
71331
+ // Handlers
71325
71332
  const handleCheckbox = (newChain) => {
71326
71333
  const prevChainFilterOptions = chainFilterOption;
71327
71334
  let newChainFilterOption;
@@ -71365,12 +71372,12 @@ const NetworkFilter = ({ chainFilterOption, setChainFilterOption, }) => {
71365
71372
  top: '45px',
71366
71373
  right: '0px',
71367
71374
  width: '200px',
71368
- height: ['300px', '300px', '350px'],
71375
+ maxHeight: ['300px', '300px', '350px'],
71369
71376
  overflowY: 'scroll',
71370
71377
  borderRadius: 'normal',
71371
71378
  background: 'white2',
71372
71379
  zIndex: 1001,
71373
- }, children: ['All Chains', ...MAINNET_CHAINS].map((chainId) => {
71380
+ }, children: ['All Chains', ...chains].map((chainId) => {
71374
71381
  return (jsx$2(Flex, { sx: {
71375
71382
  borderRadius: 'normal',
71376
71383
  p: '5px 15px',
@@ -71513,6 +71520,8 @@ const YourBonds = () => {
71513
71520
 
71514
71521
  // This basically returns the 2 tags with the higher active bond count
71515
71522
  const useTopTags = (initialBondList) => {
71523
+ const SDKConfig = useSDKConfig();
71524
+ const chains = SDKConfig.chains;
71516
71525
  const bonds = initialBondList;
71517
71526
  const countTagsInBonds = (bonds) => {
71518
71527
  const tagCount = {};
@@ -71531,7 +71540,7 @@ const useTopTags = (initialBondList) => {
71531
71540
  });
71532
71541
  return tagCount;
71533
71542
  };
71534
- const activeBonds = bonds === null || bonds === void 0 ? void 0 : bonds.filter((bond) => !bond.soldOut);
71543
+ const activeBonds = bonds === null || bonds === void 0 ? void 0 : bonds.filter((bond) => !bond.soldOut && (chains === null || chains === void 0 ? void 0 : chains.includes(bond.chainId)));
71535
71544
  const countedTags = countTagsInBonds(activeBonds);
71536
71545
  const sortedTagsArray = Object.entries(countedTags).sort((a, b) => b[1] - a[1]);
71537
71546
  return sortedTagsArray.slice(0, 2).map((tagCountArray) => tagCountArray[0]);
@@ -72256,6 +72265,7 @@ const TokenSelectorModal = ({ bondPrincipalToken, bondEarnToken, handleCurrencyS
72256
72265
 
72257
72266
  const TokenSelectorPanel = ({ typedValue, setTypedValue, selectedToken, chainId, handleValueBtn, handleCurrencySelect, enableZap, tokenBalance, selectedTokenPrice, bondPrincipalToken, bondEarnToken, modalVariant, }) => {
72258
72267
  var _a, _b;
72268
+ const { address: account } = useAccount();
72259
72269
  const tokenBalanceString = tokenBalance ? new BigNumber$1(tokenBalance).toPrecision(5) : 'loading';
72260
72270
  const splited = typeof selectedToken !== 'string' ? (_a = selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.symbol) === null || _a === void 0 ? void 0 : _a.split('-') : undefined;
72261
72271
  const handleInputChange = (event) => {
@@ -72278,7 +72288,7 @@ const TokenSelectorPanel = ({ typedValue, setTypedValue, selectedToken, chainId,
72278
72288
  : v.currentTarget.value.slice(0, v.currentTarget.value.length - 1);
72279
72289
  } }) }), jsxs(Flex$1, { className: "input-container token", onClick: () => (enableZap ? onTokenSelectorModal() : null), sx: { cursor: enableZap ? 'pointer' : 'default' }, children: [jsxs(Flex$1, { children: [jsx$2(Flex$1, { className: "input-container bondicon", children: lodashExports.isArray(splited) ? (jsx$2(TokenImage, { symbol: splited[0], symbol2: splited[1], size: 28, chain: chainId })) : (jsx$2(TokenImage, { symbol: getSymbol(selectedToken, chainId), size: 28, chain: chainId })) }), jsx$2(Flex$1, { className: "title-container tokenname", children: getSymbol(selectedToken, chainId) })] }), enableZap && (jsx$2(Flex$1, { sx: { mr: '8px' }, children: jsx$2(Svg, { icon: "caret" }) }))] })] }), jsxs(Flex$1, { className: "input-container balancerow", children: [jsx$2(Flex$1, { children: selectedTokenPrice && typedValue
72280
72290
  ? `$${formatUSDNumber((selectedTokenPrice * parseFloat(typedValue)).toFixed(2))}`
72281
- : '' }), jsxs(Flex$1, { children: [jsxs(Flex$1, { className: "balancerow text", children: ["Balance: ", tokenBalanceString] }), jsxs(Flex$1, { className: "balancerow max", children: [tokenBalance && tokenBalance !== '0' && handleValueBtn && modalVariant !== 'alt' && (jsx$2(Fragment$1, { children: jsx$2(Button, { className: "max-button", onClick: () => { var _a; return handleValueBtn((_a = new BigNumber$1(tokenBalance !== null && tokenBalance !== void 0 ? tokenBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, children: "Max" }) })), tokenBalance && tokenBalance !== '0' && handleValueBtn && modalVariant === 'alt' && (jsxs(Flex$1, { children: [jsx$2(Button, { className: "max-button", onClick: () => handleValueBtn((parseFloat(tokenBalance) / 4).toString()), children: "25%" }), jsx$2(Button, { className: "max-button", onClick: () => handleValueBtn((parseFloat(tokenBalance) / 2).toString()), children: "50%" }), jsx$2(Button, { className: "max-button", onClick: () => handleValueBtn((parseFloat(tokenBalance) * 0.75).toString()), children: "75%" }), jsx$2(Button, { className: "max-button", onClick: () => { var _a; return handleValueBtn((_a = new BigNumber$1(tokenBalance !== null && tokenBalance !== void 0 ? tokenBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, children: "Max" })] }))] })] })] })] }));
72291
+ : '' }), jsxs(Flex$1, { children: [account && jsxs(Flex$1, { className: "balancerow text", children: ["Balance: ", tokenBalanceString] }), jsxs(Flex$1, { className: "balancerow max", children: [tokenBalance && tokenBalance !== '0' && handleValueBtn && modalVariant !== 'alt' && (jsx$2(Fragment$1, { children: jsx$2(Button, { className: "max-button", onClick: () => { var _a; return handleValueBtn((_a = new BigNumber$1(tokenBalance !== null && tokenBalance !== void 0 ? tokenBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, children: "Max" }) })), tokenBalance && tokenBalance !== '0' && handleValueBtn && modalVariant === 'alt' && (jsxs(Flex$1, { children: [jsx$2(Button, { className: "max-button", onClick: () => handleValueBtn((parseFloat(tokenBalance) / 4).toString()), children: "25%" }), jsx$2(Button, { className: "max-button", onClick: () => handleValueBtn((parseFloat(tokenBalance) / 2).toString()), children: "50%" }), jsx$2(Button, { className: "max-button", onClick: () => handleValueBtn((parseFloat(tokenBalance) * 0.75).toString()), children: "75%" }), jsx$2(Button, { className: "max-button", onClick: () => { var _a; return handleValueBtn((_a = new BigNumber$1(tokenBalance !== null && tokenBalance !== void 0 ? tokenBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, children: "Max" })] }))] })] })] })] }));
72282
72292
  };
72283
72293
 
72284
72294
  var NetworkNames;
@@ -72459,6 +72469,708 @@ const useSoulZapTokenQuote = (typedValue, inputCurrency, outputToken, chainId, a
72459
72469
  return [isLoading, response, estimateOutput, zapError];
72460
72470
  };
72461
72471
 
72472
+ var USDT_ETH_ABI = [
72473
+ {
72474
+ constant: true,
72475
+ inputs: [
72476
+ ],
72477
+ name: "name",
72478
+ outputs: [
72479
+ {
72480
+ name: "",
72481
+ type: "string"
72482
+ }
72483
+ ],
72484
+ payable: false,
72485
+ stateMutability: "view",
72486
+ type: "function"
72487
+ },
72488
+ {
72489
+ constant: false,
72490
+ inputs: [
72491
+ {
72492
+ name: "_upgradedAddress",
72493
+ type: "address"
72494
+ }
72495
+ ],
72496
+ name: "deprecate",
72497
+ outputs: [
72498
+ ],
72499
+ payable: false,
72500
+ stateMutability: "nonpayable",
72501
+ type: "function"
72502
+ },
72503
+ {
72504
+ constant: false,
72505
+ inputs: [
72506
+ {
72507
+ name: "_spender",
72508
+ type: "address"
72509
+ },
72510
+ {
72511
+ name: "_value",
72512
+ type: "uint256"
72513
+ }
72514
+ ],
72515
+ name: "approve",
72516
+ outputs: [
72517
+ ],
72518
+ payable: false,
72519
+ stateMutability: "nonpayable",
72520
+ type: "function"
72521
+ },
72522
+ {
72523
+ constant: true,
72524
+ inputs: [
72525
+ ],
72526
+ name: "deprecated",
72527
+ outputs: [
72528
+ {
72529
+ name: "",
72530
+ type: "bool"
72531
+ }
72532
+ ],
72533
+ payable: false,
72534
+ stateMutability: "view",
72535
+ type: "function"
72536
+ },
72537
+ {
72538
+ constant: false,
72539
+ inputs: [
72540
+ {
72541
+ name: "_evilUser",
72542
+ type: "address"
72543
+ }
72544
+ ],
72545
+ name: "addBlackList",
72546
+ outputs: [
72547
+ ],
72548
+ payable: false,
72549
+ stateMutability: "nonpayable",
72550
+ type: "function"
72551
+ },
72552
+ {
72553
+ constant: true,
72554
+ inputs: [
72555
+ ],
72556
+ name: "totalSupply",
72557
+ outputs: [
72558
+ {
72559
+ name: "",
72560
+ type: "uint256"
72561
+ }
72562
+ ],
72563
+ payable: false,
72564
+ stateMutability: "view",
72565
+ type: "function"
72566
+ },
72567
+ {
72568
+ constant: false,
72569
+ inputs: [
72570
+ {
72571
+ name: "_from",
72572
+ type: "address"
72573
+ },
72574
+ {
72575
+ name: "_to",
72576
+ type: "address"
72577
+ },
72578
+ {
72579
+ name: "_value",
72580
+ type: "uint256"
72581
+ }
72582
+ ],
72583
+ name: "transferFrom",
72584
+ outputs: [
72585
+ ],
72586
+ payable: false,
72587
+ stateMutability: "nonpayable",
72588
+ type: "function"
72589
+ },
72590
+ {
72591
+ constant: true,
72592
+ inputs: [
72593
+ ],
72594
+ name: "upgradedAddress",
72595
+ outputs: [
72596
+ {
72597
+ name: "",
72598
+ type: "address"
72599
+ }
72600
+ ],
72601
+ payable: false,
72602
+ stateMutability: "view",
72603
+ type: "function"
72604
+ },
72605
+ {
72606
+ constant: true,
72607
+ inputs: [
72608
+ {
72609
+ name: "",
72610
+ type: "address"
72611
+ }
72612
+ ],
72613
+ name: "balances",
72614
+ outputs: [
72615
+ {
72616
+ name: "",
72617
+ type: "uint256"
72618
+ }
72619
+ ],
72620
+ payable: false,
72621
+ stateMutability: "view",
72622
+ type: "function"
72623
+ },
72624
+ {
72625
+ constant: true,
72626
+ inputs: [
72627
+ ],
72628
+ name: "decimals",
72629
+ outputs: [
72630
+ {
72631
+ name: "",
72632
+ type: "uint256"
72633
+ }
72634
+ ],
72635
+ payable: false,
72636
+ stateMutability: "view",
72637
+ type: "function"
72638
+ },
72639
+ {
72640
+ constant: true,
72641
+ inputs: [
72642
+ ],
72643
+ name: "maximumFee",
72644
+ outputs: [
72645
+ {
72646
+ name: "",
72647
+ type: "uint256"
72648
+ }
72649
+ ],
72650
+ payable: false,
72651
+ stateMutability: "view",
72652
+ type: "function"
72653
+ },
72654
+ {
72655
+ constant: true,
72656
+ inputs: [
72657
+ ],
72658
+ name: "_totalSupply",
72659
+ outputs: [
72660
+ {
72661
+ name: "",
72662
+ type: "uint256"
72663
+ }
72664
+ ],
72665
+ payable: false,
72666
+ stateMutability: "view",
72667
+ type: "function"
72668
+ },
72669
+ {
72670
+ constant: false,
72671
+ inputs: [
72672
+ ],
72673
+ name: "unpause",
72674
+ outputs: [
72675
+ ],
72676
+ payable: false,
72677
+ stateMutability: "nonpayable",
72678
+ type: "function"
72679
+ },
72680
+ {
72681
+ constant: true,
72682
+ inputs: [
72683
+ {
72684
+ name: "_maker",
72685
+ type: "address"
72686
+ }
72687
+ ],
72688
+ name: "getBlackListStatus",
72689
+ outputs: [
72690
+ {
72691
+ name: "",
72692
+ type: "bool"
72693
+ }
72694
+ ],
72695
+ payable: false,
72696
+ stateMutability: "view",
72697
+ type: "function"
72698
+ },
72699
+ {
72700
+ constant: true,
72701
+ inputs: [
72702
+ {
72703
+ name: "",
72704
+ type: "address"
72705
+ },
72706
+ {
72707
+ name: "",
72708
+ type: "address"
72709
+ }
72710
+ ],
72711
+ name: "allowed",
72712
+ outputs: [
72713
+ {
72714
+ name: "",
72715
+ type: "uint256"
72716
+ }
72717
+ ],
72718
+ payable: false,
72719
+ stateMutability: "view",
72720
+ type: "function"
72721
+ },
72722
+ {
72723
+ constant: true,
72724
+ inputs: [
72725
+ ],
72726
+ name: "paused",
72727
+ outputs: [
72728
+ {
72729
+ name: "",
72730
+ type: "bool"
72731
+ }
72732
+ ],
72733
+ payable: false,
72734
+ stateMutability: "view",
72735
+ type: "function"
72736
+ },
72737
+ {
72738
+ constant: true,
72739
+ inputs: [
72740
+ {
72741
+ name: "who",
72742
+ type: "address"
72743
+ }
72744
+ ],
72745
+ name: "balanceOf",
72746
+ outputs: [
72747
+ {
72748
+ name: "",
72749
+ type: "uint256"
72750
+ }
72751
+ ],
72752
+ payable: false,
72753
+ stateMutability: "view",
72754
+ type: "function"
72755
+ },
72756
+ {
72757
+ constant: false,
72758
+ inputs: [
72759
+ ],
72760
+ name: "pause",
72761
+ outputs: [
72762
+ ],
72763
+ payable: false,
72764
+ stateMutability: "nonpayable",
72765
+ type: "function"
72766
+ },
72767
+ {
72768
+ constant: true,
72769
+ inputs: [
72770
+ ],
72771
+ name: "getOwner",
72772
+ outputs: [
72773
+ {
72774
+ name: "",
72775
+ type: "address"
72776
+ }
72777
+ ],
72778
+ payable: false,
72779
+ stateMutability: "view",
72780
+ type: "function"
72781
+ },
72782
+ {
72783
+ constant: true,
72784
+ inputs: [
72785
+ ],
72786
+ name: "owner",
72787
+ outputs: [
72788
+ {
72789
+ name: "",
72790
+ type: "address"
72791
+ }
72792
+ ],
72793
+ payable: false,
72794
+ stateMutability: "view",
72795
+ type: "function"
72796
+ },
72797
+ {
72798
+ constant: true,
72799
+ inputs: [
72800
+ ],
72801
+ name: "symbol",
72802
+ outputs: [
72803
+ {
72804
+ name: "",
72805
+ type: "string"
72806
+ }
72807
+ ],
72808
+ payable: false,
72809
+ stateMutability: "view",
72810
+ type: "function"
72811
+ },
72812
+ {
72813
+ constant: false,
72814
+ inputs: [
72815
+ {
72816
+ name: "_to",
72817
+ type: "address"
72818
+ },
72819
+ {
72820
+ name: "_value",
72821
+ type: "uint256"
72822
+ }
72823
+ ],
72824
+ name: "transfer",
72825
+ outputs: [
72826
+ ],
72827
+ payable: false,
72828
+ stateMutability: "nonpayable",
72829
+ type: "function"
72830
+ },
72831
+ {
72832
+ constant: false,
72833
+ inputs: [
72834
+ {
72835
+ name: "newBasisPoints",
72836
+ type: "uint256"
72837
+ },
72838
+ {
72839
+ name: "newMaxFee",
72840
+ type: "uint256"
72841
+ }
72842
+ ],
72843
+ name: "setParams",
72844
+ outputs: [
72845
+ ],
72846
+ payable: false,
72847
+ stateMutability: "nonpayable",
72848
+ type: "function"
72849
+ },
72850
+ {
72851
+ constant: false,
72852
+ inputs: [
72853
+ {
72854
+ name: "amount",
72855
+ type: "uint256"
72856
+ }
72857
+ ],
72858
+ name: "issue",
72859
+ outputs: [
72860
+ ],
72861
+ payable: false,
72862
+ stateMutability: "nonpayable",
72863
+ type: "function"
72864
+ },
72865
+ {
72866
+ constant: false,
72867
+ inputs: [
72868
+ {
72869
+ name: "amount",
72870
+ type: "uint256"
72871
+ }
72872
+ ],
72873
+ name: "redeem",
72874
+ outputs: [
72875
+ ],
72876
+ payable: false,
72877
+ stateMutability: "nonpayable",
72878
+ type: "function"
72879
+ },
72880
+ {
72881
+ constant: true,
72882
+ inputs: [
72883
+ {
72884
+ name: "_owner",
72885
+ type: "address"
72886
+ },
72887
+ {
72888
+ name: "_spender",
72889
+ type: "address"
72890
+ }
72891
+ ],
72892
+ name: "allowance",
72893
+ outputs: [
72894
+ {
72895
+ name: "remaining",
72896
+ type: "uint256"
72897
+ }
72898
+ ],
72899
+ payable: false,
72900
+ stateMutability: "view",
72901
+ type: "function"
72902
+ },
72903
+ {
72904
+ constant: true,
72905
+ inputs: [
72906
+ ],
72907
+ name: "basisPointsRate",
72908
+ outputs: [
72909
+ {
72910
+ name: "",
72911
+ type: "uint256"
72912
+ }
72913
+ ],
72914
+ payable: false,
72915
+ stateMutability: "view",
72916
+ type: "function"
72917
+ },
72918
+ {
72919
+ constant: true,
72920
+ inputs: [
72921
+ {
72922
+ name: "",
72923
+ type: "address"
72924
+ }
72925
+ ],
72926
+ name: "isBlackListed",
72927
+ outputs: [
72928
+ {
72929
+ name: "",
72930
+ type: "bool"
72931
+ }
72932
+ ],
72933
+ payable: false,
72934
+ stateMutability: "view",
72935
+ type: "function"
72936
+ },
72937
+ {
72938
+ constant: false,
72939
+ inputs: [
72940
+ {
72941
+ name: "_clearedUser",
72942
+ type: "address"
72943
+ }
72944
+ ],
72945
+ name: "removeBlackList",
72946
+ outputs: [
72947
+ ],
72948
+ payable: false,
72949
+ stateMutability: "nonpayable",
72950
+ type: "function"
72951
+ },
72952
+ {
72953
+ constant: true,
72954
+ inputs: [
72955
+ ],
72956
+ name: "MAX_UINT",
72957
+ outputs: [
72958
+ {
72959
+ name: "",
72960
+ type: "uint256"
72961
+ }
72962
+ ],
72963
+ payable: false,
72964
+ stateMutability: "view",
72965
+ type: "function"
72966
+ },
72967
+ {
72968
+ constant: false,
72969
+ inputs: [
72970
+ {
72971
+ name: "newOwner",
72972
+ type: "address"
72973
+ }
72974
+ ],
72975
+ name: "transferOwnership",
72976
+ outputs: [
72977
+ ],
72978
+ payable: false,
72979
+ stateMutability: "nonpayable",
72980
+ type: "function"
72981
+ },
72982
+ {
72983
+ constant: false,
72984
+ inputs: [
72985
+ {
72986
+ name: "_blackListedUser",
72987
+ type: "address"
72988
+ }
72989
+ ],
72990
+ name: "destroyBlackFunds",
72991
+ outputs: [
72992
+ ],
72993
+ payable: false,
72994
+ stateMutability: "nonpayable",
72995
+ type: "function"
72996
+ },
72997
+ {
72998
+ inputs: [
72999
+ {
73000
+ name: "_initialSupply",
73001
+ type: "uint256"
73002
+ },
73003
+ {
73004
+ name: "_name",
73005
+ type: "string"
73006
+ },
73007
+ {
73008
+ name: "_symbol",
73009
+ type: "string"
73010
+ },
73011
+ {
73012
+ name: "_decimals",
73013
+ type: "uint256"
73014
+ }
73015
+ ],
73016
+ payable: false,
73017
+ stateMutability: "nonpayable",
73018
+ type: "constructor"
73019
+ },
73020
+ {
73021
+ anonymous: false,
73022
+ inputs: [
73023
+ {
73024
+ indexed: false,
73025
+ name: "amount",
73026
+ type: "uint256"
73027
+ }
73028
+ ],
73029
+ name: "Issue",
73030
+ type: "event"
73031
+ },
73032
+ {
73033
+ anonymous: false,
73034
+ inputs: [
73035
+ {
73036
+ indexed: false,
73037
+ name: "amount",
73038
+ type: "uint256"
73039
+ }
73040
+ ],
73041
+ name: "Redeem",
73042
+ type: "event"
73043
+ },
73044
+ {
73045
+ anonymous: false,
73046
+ inputs: [
73047
+ {
73048
+ indexed: false,
73049
+ name: "newAddress",
73050
+ type: "address"
73051
+ }
73052
+ ],
73053
+ name: "Deprecate",
73054
+ type: "event"
73055
+ },
73056
+ {
73057
+ anonymous: false,
73058
+ inputs: [
73059
+ {
73060
+ indexed: false,
73061
+ name: "feeBasisPoints",
73062
+ type: "uint256"
73063
+ },
73064
+ {
73065
+ indexed: false,
73066
+ name: "maxFee",
73067
+ type: "uint256"
73068
+ }
73069
+ ],
73070
+ name: "Params",
73071
+ type: "event"
73072
+ },
73073
+ {
73074
+ anonymous: false,
73075
+ inputs: [
73076
+ {
73077
+ indexed: false,
73078
+ name: "_blackListedUser",
73079
+ type: "address"
73080
+ },
73081
+ {
73082
+ indexed: false,
73083
+ name: "_balance",
73084
+ type: "uint256"
73085
+ }
73086
+ ],
73087
+ name: "DestroyedBlackFunds",
73088
+ type: "event"
73089
+ },
73090
+ {
73091
+ anonymous: false,
73092
+ inputs: [
73093
+ {
73094
+ indexed: false,
73095
+ name: "_user",
73096
+ type: "address"
73097
+ }
73098
+ ],
73099
+ name: "AddedBlackList",
73100
+ type: "event"
73101
+ },
73102
+ {
73103
+ anonymous: false,
73104
+ inputs: [
73105
+ {
73106
+ indexed: false,
73107
+ name: "_user",
73108
+ type: "address"
73109
+ }
73110
+ ],
73111
+ name: "RemovedBlackList",
73112
+ type: "event"
73113
+ },
73114
+ {
73115
+ anonymous: false,
73116
+ inputs: [
73117
+ {
73118
+ indexed: true,
73119
+ name: "owner",
73120
+ type: "address"
73121
+ },
73122
+ {
73123
+ indexed: true,
73124
+ name: "spender",
73125
+ type: "address"
73126
+ },
73127
+ {
73128
+ indexed: false,
73129
+ name: "value",
73130
+ type: "uint256"
73131
+ }
73132
+ ],
73133
+ name: "Approval",
73134
+ type: "event"
73135
+ },
73136
+ {
73137
+ anonymous: false,
73138
+ inputs: [
73139
+ {
73140
+ indexed: true,
73141
+ name: "from",
73142
+ type: "address"
73143
+ },
73144
+ {
73145
+ indexed: true,
73146
+ name: "to",
73147
+ type: "address"
73148
+ },
73149
+ {
73150
+ indexed: false,
73151
+ name: "value",
73152
+ type: "uint256"
73153
+ }
73154
+ ],
73155
+ name: "Transfer",
73156
+ type: "event"
73157
+ },
73158
+ {
73159
+ anonymous: false,
73160
+ inputs: [
73161
+ ],
73162
+ name: "Pause",
73163
+ type: "event"
73164
+ },
73165
+ {
73166
+ anonymous: false,
73167
+ inputs: [
73168
+ ],
73169
+ name: "Unpause",
73170
+ type: "event"
73171
+ }
73172
+ ];
73173
+
72462
73174
  /**
72463
73175
  * useAllowance hook: fetches the amount approved by the user for a given token
72464
73176
  * useApproval hook: returns the approval state (not approved, pending or approved) and a function to approve on chain
@@ -72537,7 +73249,9 @@ const useApproval = (amount, currency, spender, account, chainId) => {
72537
73249
  setConfirmingTxOnWallet(true);
72538
73250
  const hash = yield writeContractAsync({
72539
73251
  address: tokenAddress,
72540
- abi: ERC_20_ABI,
73252
+ abi: (tokenAddress === null || tokenAddress === void 0 ? void 0 : tokenAddress.toLowerCase()) === '0xdAC17F958D2ee523a2206206994597C13D831ec7'.toLowerCase()
73253
+ ? USDT_ETH_ABI
73254
+ : ERC_20_ABI,
72541
73255
  functionName: 'approve',
72542
73256
  args: [spender, bigishAmount],
72543
73257
  });
@@ -73712,7 +74426,7 @@ const getHotBonds = (bondData, hotBondContracts) => __awaiter$9(void 0, void 0,
73712
74426
  const HotBondCards = () => {
73713
74427
  var _a;
73714
74428
  const { data: hotBonds } = useHotBonds();
73715
- const filteredBonds = (_a = hotBonds === null || hotBonds === void 0 ? void 0 : hotBonds.sort((a, b) => { var _a, _b; return ((_a = b === null || b === void 0 ? void 0 : b.discount) !== null && _a !== void 0 ? _a : 0) - ((_b = a === null || a === void 0 ? void 0 : a.discount) !== null && _b !== void 0 ? _b : 0); })) === null || _a === void 0 ? void 0 : _a.filter((bond) => { var _a; return ((_a = bond === null || bond === void 0 ? void 0 : bond.discount) !== null && _a !== void 0 ? _a : 0) > 0; });
74429
+ const filteredBonds = (_a = hotBonds === null || hotBonds === void 0 ? void 0 : hotBonds.sort((a, b) => { var _a, _b; return ((_a = b === null || b === void 0 ? void 0 : b.discount) !== null && _a !== void 0 ? _a : 0) - ((_b = a === null || a === void 0 ? void 0 : a.discount) !== null && _b !== void 0 ? _b : 0); })) === null || _a === void 0 ? void 0 : _a.filter((bond) => (bond === null || bond === void 0 ? void 0 : bond.discount) > 0 && (bond === null || bond === void 0 ? void 0 : bond.discount) < 50);
73716
74430
  const [activeSlide, setActiveSlide] = useState(0);
73717
74431
  const { swiper, setSwiper } = useSwiper();
73718
74432
  const handleSlide = (event) => {
@@ -73794,10 +74508,12 @@ function useUserApiStats() {
73794
74508
  const BuyAgainRow = () => {
73795
74509
  const { data: userData } = useUserApiStats();
73796
74510
  const { data: bills } = useBondsData();
74511
+ const SDKConfig = useSDKConfig();
74512
+ const chains = SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.chains;
73797
74513
  const buyAgainBond = useMemo(() => {
73798
74514
  if (userData && (userData === null || userData === void 0 ? void 0 : userData.Sales.length) > 0) {
73799
74515
  const sortedPurchases = userData === null || userData === void 0 ? void 0 : userData.Sales.sort((a, b) => b.dollarValue - a.dollarValue);
73800
- const activeBills = bills === null || bills === void 0 ? void 0 : bills.filter((bill) => !isBondSoldOut(bill));
74516
+ const activeBills = bills === null || bills === void 0 ? void 0 : bills.filter((bill) => !isBondSoldOut(bill) && (chains === null || chains === void 0 ? void 0 : chains.includes(bill.chainId)));
73801
74517
  const highestActivePurchase = sortedPurchases === null || sortedPurchases === void 0 ? void 0 : sortedPurchases.find((purchase) => activeBills === null || activeBills === void 0 ? void 0 : activeBills.find((bill) => {
73802
74518
  var _a;
73803
74519
  if (purchase.contractAddress.toLowerCase() === ((_a = bill === null || bill === void 0 ? void 0 : bill.billAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()))
@@ -73805,7 +74521,7 @@ const BuyAgainRow = () => {
73805
74521
  }));
73806
74522
  return activeBills === null || activeBills === void 0 ? void 0 : activeBills.find((bill) => { var _a, _b; return ((_a = bill === null || bill === void 0 ? void 0 : bill.billAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = highestActivePurchase === null || highestActivePurchase === void 0 ? void 0 : highestActivePurchase.contractAddress) === null || _b === void 0 ? void 0 : _b.toLowerCase()); });
73807
74523
  }
73808
- }, [bills, userData === null || userData === void 0 ? void 0 : userData.Sales.length]);
74524
+ }, [bills, userData === null || userData === void 0 ? void 0 : userData.Sales.length, chains]);
73809
74525
  return buyAgainBond ? (jsx$2(AnimatePresence, { children: jsx$2(motion.div, { initial: { height: 0, overflow: 'hidden' }, animate: { height: 'fit-content', overflow: 'hidden', transitionEnd: { overflow: 'visible' } }, exit: { height: 0, overflow: 'hidden' }, sx: {
73810
74526
  position: 'relative',
73811
74527
  overflow: 'hidden',
@@ -73959,13 +74675,14 @@ const Bonds = () => {
73959
74675
  const [filterOption, setFilterOption] = useState('ALL');
73960
74676
  const sortedBonds = sortBonds(sortConfig, bondData);
73961
74677
  const topTags = useTopTags(sortedBonds);
74678
+ // remove favorites for seedify
73962
74679
  const filterOptions = SDKConfig.referenceId !== 'seedify' ? ['ALL', 'FAVORITES', ...topTags, 'SOLD OUT'] : ['ALL', ...topTags, 'SOLD OUT'];
73963
74680
  const billsToRender = useMemo(() => {
73964
74681
  let billsToReturn = filterOption === 'SOLD OUT' ? (allBonds !== null && allBonds !== void 0 ? allBonds : []) : (sortedBonds !== null && sortedBonds !== void 0 ? sortedBonds : []);
73965
74682
  if (searchQuery) {
73966
74683
  billsToReturn = billsToReturn === null || billsToReturn === void 0 ? void 0 : billsToReturn.filter((bill) => {
73967
74684
  var _a, _b;
73968
- return [`${(_a = bill === null || bill === void 0 ? void 0 : bill.earnToken) === null || _a === void 0 ? void 0 : _a.symbol.toUpperCase()}`, `${(_b = bill === null || bill === void 0 ? void 0 : bill.lpToken) === null || _b === void 0 ? void 0 : _b.symbol.toUpperCase()}`].includes(searchQuery.toUpperCase());
74685
+ return [`${(_a = bill === null || bill === void 0 ? void 0 : bill.earnToken) === null || _a === void 0 ? void 0 : _a.symbol.toUpperCase()}`, `${(_b = bill === null || bill === void 0 ? void 0 : bill.lpToken) === null || _b === void 0 ? void 0 : _b.symbol.toUpperCase()}`].some((property) => property === null || property === void 0 ? void 0 : property.includes(searchQuery.toUpperCase()));
73969
74686
  });
73970
74687
  }
73971
74688
  if (topTags.includes(filterOption)) {
@@ -74005,7 +74722,7 @@ const Bonds = () => {
74005
74722
  alignItems: 'center',
74006
74723
  flexDirection: 'column',
74007
74724
  mt: '10px',
74008
- }, children: [jsx$2(Svg, { icon: "StarFilled", width: 75, height: 75 }), jsx$2(Flex$1, { sx: { mt: '10px' }, children: `You don't have any Favorite Bonds yet!` }), jsx$2(Flex$1, { sx: { fontSize: '12px', fontWeight: 400, color: 'textDisabledButton', mt: '10px' }, children: `Click on the 'star' or 'fire' icon to add Bonds to the list.` })] })) : (jsx$2(Flex$1, { className: "bonds-spinner", children: jsx$2(Spinner, { size: 100 }) })), jsx$2(RecommendationCards$1, {})] }));
74725
+ }, children: [jsx$2(Svg, { icon: "StarFilled", width: 75, height: 75 }), jsx$2(Flex$1, { sx: { mt: '10px' }, children: `You don't have any Favorite Bonds yet!` }), jsx$2(Flex$1, { sx: { fontSize: '12px', fontWeight: 400, color: 'textDisabledButton', mt: '10px' }, children: `Click on the 'star' or 'fire' icon to add Bonds to the list.` })] })) : (jsx$2(Flex$1, { className: "bonds-spinner", children: jsx$2(Spinner, { size: 100 }) })), SDKConfig.useHotBonds && jsx$2(RecommendationCards$1, {})] }));
74009
74726
  };
74010
74727
 
74011
74728
  var BondsViewOptions;
@@ -2,4 +2,4 @@ import { UseQueryResult } from '@tanstack/react-query';
2
2
  import { BillsConfig } from '@ape.swap/apeswap-lists';
3
3
  import { UserBill } from '../../types/yourbonds';
4
4
  export default function useUserBonds(): UseQueryResult<UserBill[]>;
5
- export declare const getUserBonds: (account: string, bondList: BillsConfig[]) => Promise<UserBill[]>;
5
+ export declare const getUserBonds: (account: string, bondList: BillsConfig[], chains: number[]) => Promise<UserBill[]>;
package/dist/styles.css CHANGED
@@ -255,7 +255,7 @@
255
255
  padding-left: 10px;
256
256
  }
257
257
 
258
- .modaltable-container.description-container {
258
+ .description-container {
259
259
  display: flex;
260
260
  align-items: flex-start;
261
261
  font-weight: 400;
@@ -1745,8 +1745,8 @@ span.flex-inline {
1745
1745
  background-color: rgba(255, 255, 255, 0.1);
1746
1746
  backdrop-filter: blur(34px);
1747
1747
  border-radius: 10px;
1748
- justify-content: start;
1749
- align-items: start;
1748
+ justify-content: flex-start;
1749
+ align-items: flex-start;
1750
1750
  flex-direction: column;
1751
1751
  padding: 10px 8px 10px 8px;
1752
1752
  margin-top: -3px;
@@ -1754,7 +1754,7 @@ span.flex-inline {
1754
1754
 
1755
1755
  .sharebondimage-container-discount {
1756
1756
  display: flex;
1757
- justify-content: start;
1757
+ justify-content: flex-start;
1758
1758
  align-items: center;
1759
1759
  width: 100%;
1760
1760
  background-color: rgba(255, 255, 255, 0.05);
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.1.0",
6
+ "version": "2.1.1",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",