@berachain/berajs 0.2.8-beta.0 → 0.2.8-beta.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.
Files changed (35) hide show
  1. package/dist/abi/exports.mjs +1 -1
  2. package/dist/actions/exports.cjs +1 -1
  3. package/dist/actions/exports.cjs.map +1 -1
  4. package/dist/actions/exports.d.cts +3 -3
  5. package/dist/actions/exports.d.ts +3 -3
  6. package/dist/actions/exports.mjs +1 -1
  7. package/dist/{chunk-LNVR4BW6.cjs → chunk-2EN6PPAW.cjs} +2 -2
  8. package/dist/{chunk-LNVR4BW6.cjs.map → chunk-2EN6PPAW.cjs.map} +1 -1
  9. package/dist/{chunk-LHR24OO7.cjs → chunk-7ITWLMO7.cjs} +3 -3
  10. package/dist/{chunk-LHR24OO7.cjs.map → chunk-7ITWLMO7.cjs.map} +1 -1
  11. package/dist/{chunk-FM3WDBFH.mjs → chunk-EFG3OYYQ.mjs} +2 -2
  12. package/dist/{chunk-CF3LFNXG.cjs → chunk-GO5E7UUD.cjs} +2 -2
  13. package/dist/{chunk-CF3LFNXG.cjs.map → chunk-GO5E7UUD.cjs.map} +1 -1
  14. package/dist/{chunk-FCZ72ML6.mjs → chunk-JE5GI2OC.mjs} +3 -3
  15. package/dist/chunk-JE5GI2OC.mjs.map +1 -0
  16. package/dist/{chunk-COMMLZ3O.mjs → chunk-KI66MQ43.mjs} +2 -2
  17. package/dist/contexts/exports.cjs +1 -1
  18. package/dist/contexts/exports.cjs.map +1 -1
  19. package/dist/contexts/exports.mjs +1 -1
  20. package/dist/{getValidatorQueuedOperatorAddress-BfKrMaui.d.cts → getValidatorQueuedOperatorAddress-BQXkSFd9.d.cts} +1 -1
  21. package/dist/{getValidatorQueuedOperatorAddress-Bef1e1c_.d.ts → getValidatorQueuedOperatorAddress-DUZOmxLV.d.ts} +1 -1
  22. package/dist/{global.d-DW7dpBsz.d.cts → global.d-6aSWIkV_.d.cts} +1 -1
  23. package/dist/{global.d-CrPSEwwf.d.ts → global.d-SU9Epq0M.d.ts} +1 -1
  24. package/dist/hooks/exports.cjs +2 -2
  25. package/dist/hooks/exports.cjs.map +1 -1
  26. package/dist/hooks/exports.d.cts +3 -3
  27. package/dist/hooks/exports.d.ts +3 -3
  28. package/dist/hooks/exports.mjs +2 -2
  29. package/dist/types/exports.d.cts +1 -1
  30. package/dist/types/exports.d.ts +1 -1
  31. package/package.json +1 -1
  32. package/src/actions/pol/getRewardVaultIncentives.ts +13 -13
  33. package/dist/chunk-FCZ72ML6.mjs.map +0 -1
  34. /package/dist/{chunk-FM3WDBFH.mjs.map → chunk-EFG3OYYQ.mjs.map} +0 -0
  35. /package/dist/{chunk-COMMLZ3O.mjs.map → chunk-KI66MQ43.mjs.map} +0 -0
@@ -1,4 +1,4 @@
1
- export { A as AggregatedTokenTotals, g as BribeBoostReward, b as BribeBoostRewardItem, B as BribeBoostRewardProof, h as BribeBoostValidatorApr, i as ClaimedIncentives, j as ClaimedIncentivesLocalState, C as CustomProposal, k as CustomProposalActionErrors, a as CustomProposalErrors, D as DefaultHookOptions, c as DefaultHookReturnType, G as GovernanceTopic, I as IContractWrite, l as IContractWriteFn, m as IncentiveReward, n as IncentiveRewardChunksWithValidatorData, o as PROPOSAL_GENRE, p as Proposal, q as ProposalAction, r as ProposalVotes, P as ProtocolMetadata, s as SafeProposalAction, d as StakedBeraAsset, S as StakingConfig, U as UserVaultInfo, V as VerifiedAbi, t as Vote, u as Voter } from '../global.d-DW7dpBsz.cjs';
1
+ export { A as AggregatedTokenTotals, g as BribeBoostReward, b as BribeBoostRewardItem, B as BribeBoostRewardProof, h as BribeBoostValidatorApr, i as ClaimedIncentives, j as ClaimedIncentivesLocalState, C as CustomProposal, k as CustomProposalActionErrors, a as CustomProposalErrors, D as DefaultHookOptions, c as DefaultHookReturnType, G as GovernanceTopic, I as IContractWrite, l as IContractWriteFn, m as IncentiveReward, n as IncentiveRewardChunksWithValidatorData, o as PROPOSAL_GENRE, p as Proposal, q as ProposalAction, r as ProposalVotes, P as ProtocolMetadata, s as SafeProposalAction, d as StakedBeraAsset, S as StakingConfig, U as UserVaultInfo, V as VerifiedAbi, t as Vote, u as Voter } from '../global.d-6aSWIkV_.cjs';
2
2
  import { M as MinimalERC20 } from '../HoneyConfigProvider-DfkjmzEf.cjs';
3
3
  export { A as AllowanceQueryItem, j as AllowanceToken, B as BalanceToken, y as BexStatus, w as Calldata, H as HoneySwapActions, I as IAggregatorArgs, z as IAggregatorQuote, g as IRawAggregatorQuote, v as IUserPosition, h as PythPriceFeedMap, S as SwapRequest, b as Token, i as TokenCurrentPriceMap, x as TokenPriceInfo, t as TokenWithAmount, a as TokenWithMetadata, D as TokenWithPrice } from '../HoneyConfigProvider-DfkjmzEf.cjs';
4
4
  import { BundleData, EnsoClient } from '@ensofinance/sdk';
@@ -1,4 +1,4 @@
1
- export { A as AggregatedTokenTotals, g as BribeBoostReward, b as BribeBoostRewardItem, B as BribeBoostRewardProof, h as BribeBoostValidatorApr, i as ClaimedIncentives, j as ClaimedIncentivesLocalState, C as CustomProposal, k as CustomProposalActionErrors, a as CustomProposalErrors, D as DefaultHookOptions, c as DefaultHookReturnType, G as GovernanceTopic, I as IContractWrite, l as IContractWriteFn, m as IncentiveReward, n as IncentiveRewardChunksWithValidatorData, o as PROPOSAL_GENRE, p as Proposal, q as ProposalAction, r as ProposalVotes, P as ProtocolMetadata, s as SafeProposalAction, d as StakedBeraAsset, S as StakingConfig, U as UserVaultInfo, V as VerifiedAbi, t as Vote, u as Voter } from '../global.d-CrPSEwwf.js';
1
+ export { A as AggregatedTokenTotals, g as BribeBoostReward, b as BribeBoostRewardItem, B as BribeBoostRewardProof, h as BribeBoostValidatorApr, i as ClaimedIncentives, j as ClaimedIncentivesLocalState, C as CustomProposal, k as CustomProposalActionErrors, a as CustomProposalErrors, D as DefaultHookOptions, c as DefaultHookReturnType, G as GovernanceTopic, I as IContractWrite, l as IContractWriteFn, m as IncentiveReward, n as IncentiveRewardChunksWithValidatorData, o as PROPOSAL_GENRE, p as Proposal, q as ProposalAction, r as ProposalVotes, P as ProtocolMetadata, s as SafeProposalAction, d as StakedBeraAsset, S as StakingConfig, U as UserVaultInfo, V as VerifiedAbi, t as Vote, u as Voter } from '../global.d-SU9Epq0M.js';
2
2
  import { M as MinimalERC20 } from '../HoneyConfigProvider-DVP_9KZn.js';
3
3
  export { A as AllowanceQueryItem, j as AllowanceToken, B as BalanceToken, y as BexStatus, w as Calldata, H as HoneySwapActions, I as IAggregatorArgs, z as IAggregatorQuote, g as IRawAggregatorQuote, v as IUserPosition, h as PythPriceFeedMap, S as SwapRequest, b as Token, i as TokenCurrentPriceMap, x as TokenPriceInfo, t as TokenWithAmount, a as TokenWithMetadata, D as TokenWithPrice } from '../HoneyConfigProvider-DVP_9KZn.js';
4
4
  import { BundleData, EnsoClient } from '@ensofinance/sdk';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@berachain/berajs",
3
- "version": "0.2.8-beta.0",
3
+ "version": "0.2.8-beta.1",
4
4
  "sideEffects": false,
5
5
  "files": [
6
6
  "dist",
@@ -54,18 +54,18 @@ export async function getRewardVaultIncentives({
54
54
  });
55
55
 
56
56
  // Only fetch totalSupply if stakingToken is in whitelistedTokens
57
- const stakingTokenIndex = whitelistedTokens.findIndex((token) =>
58
- isSameAddress(stakingToken, token),
59
- );
57
+ const hasStakingTokenAsIncentiveToken =
58
+ whitelistedTokens.findIndex((token) =>
59
+ isSameAddress(stakingToken, token),
60
+ ) !== -1;
60
61
 
61
- const totalSupply =
62
- stakingTokenIndex !== -1
63
- ? await publicClient.readContract({
64
- address: address,
65
- abi: rewardVaultAbi,
66
- functionName: "totalSupply",
67
- })
68
- : 0n;
62
+ const totalSupply = hasStakingTokenAsIncentiveToken
63
+ ? await publicClient.readContract({
64
+ address: address,
65
+ abi: rewardVaultAbi,
66
+ functionName: "totalSupply",
67
+ })
68
+ : 0n;
69
69
 
70
70
  const incentives = await Promise.allSettled(
71
71
  whitelistedTokens.map(async (token) => {
@@ -110,8 +110,8 @@ export async function getRewardVaultIncentives({
110
110
  message: "Failed to get incentive info. This is not possible.",
111
111
  level: "error",
112
112
  extra: {
113
- token: token,
114
- address: address,
113
+ token,
114
+ address,
115
115
  },
116
116
  });
117
117
  }