@merkl/api 0.10.188 → 0.10.190

Sign up to get free protection for your applications and to get access to all the features.
@@ -196,12 +196,12 @@ export class RewardService {
196
196
  throw new Error(`Chain ${chainId} not found`);
197
197
  const chainRewards = rewards.filter(reward => reward.RewardToken.chainId === chainId);
198
198
  /** Check when the last claim happened */
199
- if ((!connectedChainId || chain.id === connectedChainId) && chainRewards.length > 0) {
199
+ if (chain.id === connectedChainId && chainRewards.length > 0) {
200
200
  promises.push(RewardService.checkLastClaim(chainId, user, merkleRoots[index], chainRewards).then(r => {
201
201
  return { chain, rewards: r };
202
202
  }));
203
203
  }
204
- else {
204
+ else if (chainRewards.length > 0) {
205
205
  promises.push(Promise.resolve({ chain, rewards: chainRewards }));
206
206
  }
207
207
  }