Skip to content

Commit

Permalink
Merge branch 'release/1.3.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
Zikriya committed Apr 18, 2024
2 parents 8e26051 + 0bd2dd8 commit f3aa827
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -608,21 +608,23 @@ export const getSnapShotBySnapShotUserVolumeAndReward = async (
Object.entries<string>(snapHodlConfigBalance.totalStakedBalance).forEach(
([address, balance]) => {
totalVolume = totalVolume + Number(balance);
if (totalUserVolume[address.toLowerCase()]) {
totalUserVolume[address.toLowerCase()] = totalUserVolume[address.toLowerCase()].plus(balance);
let refactoredAddress = address.toLowerCase();
if (totalUserVolume[refactoredAddress]) {
totalUserVolume[refactoredAddress] = totalUserVolume[refactoredAddress].plus(balance);
} else {
totalUserVolume[address.toLowerCase()] = balance;
totalUserVolume[refactoredAddress] = balance;
}
}
);

Object.entries(snapHodlConfigBalance.totalTradingVolume).forEach(
([address, balance]) => {
totalVolume = totalVolume + Number(balance);
if (totalUserVolume[address.toLowerCase()]) {
totalUserVolume[address.toLowerCase()] = totalUserVolume[address.toLowerCase()].plus(balance);
let refactoredAddress = address.toLowerCase();
if (totalUserVolume[refactoredAddress]) {
totalUserVolume[refactoredAddress] = totalUserVolume[refactoredAddress].plus(balance);
} else {
totalUserVolume[address.toLowerCase()] = balance;
totalUserVolume[refactoredAddress] = balance;
}
}
);
Expand Down

0 comments on commit f3aa827

Please sign in to comment.