@merkl/api 0.15.18 → 0.15.19
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.
@@ -41,15 +41,13 @@ export class RewardService {
|
|
41
41
|
static format(rewards) {
|
42
42
|
return rewards.map(reward => {
|
43
43
|
const { Breakdown, RewardToken, id, rewardTokenId, ...rest } = reward;
|
44
|
-
const pending = Breakdown.reduce((sum, { pending }) => sum + BigInt(pending), 0n);
|
45
|
-
const claimed = Breakdown.reduce((sum, { claimed }) => sum + BigInt(claimed), 0n);
|
46
44
|
return {
|
47
45
|
...rest,
|
48
46
|
token: RewardToken,
|
49
47
|
breakdowns: Breakdown.map(RewardService.formatBreakdown),
|
50
|
-
claimed,
|
48
|
+
claimed: BigInt(rest.claimed),
|
51
49
|
amount: BigInt(rest.amount),
|
52
|
-
pending,
|
50
|
+
pending: BigInt(rest.pending),
|
53
51
|
};
|
54
52
|
});
|
55
53
|
}
|