Skip to content

Commit

Permalink
MEX-516: fix missing user outdated contracts
Browse files Browse the repository at this point in the history
Signed-off-by: Claudiu Lataretu <[email protected]>
  • Loading branch information
claudiulataretu committed Sep 11, 2024
1 parent e4ba03b commit 4706d48
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ export class UserEnergyComputeService {
(token) => token.creator,
);
const promisesDualYieldTokens = dualYieldTokens.map((token) => {
return this.getFarmAddressForDualYieldToken(token.collection);
return this.getStakeAddressForDualYieldToken(token.collection);
});

userActiveStakeAddresses = userActiveStakeAddresses.concat(
Expand Down Expand Up @@ -716,14 +716,14 @@ export class UserEnergyComputeService {
return this.stakeProxyAbi.lpFarmAddress(stakingProxyAddress);
}

async getStakeAddressForDualYieldToken(token: UserDualYiledToken) {
if (!token || token === undefined) {
async getStakeAddressForDualYieldToken(collection: string) {
if (!collection || collection === undefined) {
return undefined;
}

const stakingProxyAddress =
await this.stakeProxyService.getStakingProxyAddressByDualYieldTokenID(
token.collection,
collection,
);
return this.stakeProxyAbi.stakingFarmAddress(stakingProxyAddress);
}
Expand Down

0 comments on commit 4706d48

Please sign in to comment.