@curvefi/api 2.67.2 → 2.67.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.
- package/lib/pools/utils.js +4 -4
- package/package.json +1 -1
package/lib/pools/utils.js
CHANGED
|
@@ -167,8 +167,8 @@ function _getUserClaimable(pools, address, useCache) {
|
|
|
167
167
|
rewardInfoCalls.push(gaugeMulticallContract.claimable_tokens(address));
|
|
168
168
|
}
|
|
169
169
|
for (const token of rewardTokens[poolId]) {
|
|
170
|
-
// Don't reset
|
|
171
|
-
const { multicallContract } =
|
|
170
|
+
// Don't reset ABI if its already set, we might override an LP token ABI
|
|
171
|
+
const { multicallContract } = this.contracts[token] || _setContracts.call(this, token, ERC20Abi);
|
|
172
172
|
rewardInfoCalls.push(multicallContract.symbol(), multicallContract.decimals());
|
|
173
173
|
if ('claimable_reward(address,address)' in gaugeContract) {
|
|
174
174
|
rewardInfoCalls.push(gaugeMulticallContract.claimable_reward(address, token));
|
|
@@ -255,8 +255,8 @@ function _getUserClaimableUseApi(pools, address, useCache) {
|
|
|
255
255
|
rewardInfoCalls.push(gaugeMulticallContract.claimable_tokens(address));
|
|
256
256
|
}
|
|
257
257
|
for (const r of rewardTokens[poolId]) {
|
|
258
|
-
// Don't reset
|
|
259
|
-
if (r.token
|
|
258
|
+
// Don't reset ABI if its already set, we might override an LP token ABI
|
|
259
|
+
if (!this.contracts[r.token]) {
|
|
260
260
|
_setContracts.call(this, r.token, ERC20Abi);
|
|
261
261
|
}
|
|
262
262
|
if ('claimable_reward(address,address)' in gaugeContract) {
|