Skip to content

Commit 84d48f7

Browse files
authored
Merge pull request #5678 from VenusProtocol/feat/prime-rewards
feat: add total reward info
2 parents d3d501c + e0698ea commit 84d48f7

15 files changed

Lines changed: 56 additions & 13 deletions

File tree

.changeset/polite-trees-heal.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@venusprotocol/evm": minor
3+
---
4+
5+
add total reward info for reward card

apps/evm/src/clients/api/__mocks__/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,7 @@ export const getPrimeCurrentCycle = vi.fn(async () => ({
640640
computedAt: new Date('2026-06-17T00:00:00Z'),
641641
primeHolderCount: 500,
642642
totalCurrentCycleUsdMantissa: '462300000000000000000000',
643+
currentEstimatedTotalUsdMantissa: '600000000000000000000000',
643644
byRewardToken: [
644645
{
645646
rewardTokenAddress: usdc.address,

apps/evm/src/clients/api/queries/getPrimeCurrentCycle/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export interface PrimePendingRewardPool {
1313
computedAt: Date;
1414
primeHolderCount: number;
1515
totalCurrentCycleUsdMantissa: string;
16+
currentEstimatedTotalUsdMantissa: string;
1617
byRewardToken: PrimePendingRewardTokenTotal[];
1718
}
1819

@@ -42,6 +43,11 @@ interface PrimePendingRewardTokenTotalResponse {
4243
totalPendingUsdMantissa: string;
4344
totalCurrentCycleUsdCents: string;
4445
totalCurrentCycleUsdMantissa: string;
46+
estimatedAmountMantissa: string;
47+
currentEstimatedUsdCents: string;
48+
currentEstimatedUsdMantissa: string;
49+
cycleStartEstimatedUsdCents: string;
50+
cycleStartEstimatedUsdMantissa: string;
4551
}
4652

4753
interface PrimePendingRewardPoolResponse {
@@ -53,6 +59,10 @@ interface PrimePendingRewardPoolResponse {
5359
totalPendingUsdMantissa: string;
5460
totalCurrentCycleUsdCents: string;
5561
totalCurrentCycleUsdMantissa: string;
62+
currentEstimatedTotalUsdCents: string;
63+
currentEstimatedTotalUsdMantissa: string;
64+
cycleStartEstimatedTotalUsdCents: string;
65+
cycleStartEstimatedTotalUsdMantissa: string;
5666
byRewardToken: PrimePendingRewardTokenTotalResponse[];
5767
}
5868

@@ -99,6 +109,7 @@ export const getPrimeCurrentCycle = async ({
99109
computedAt: new Date(payload.pendingPool.computedAt),
100110
primeHolderCount: payload.pendingPool.primeHolderCount,
101111
totalCurrentCycleUsdMantissa: payload.pendingPool.totalCurrentCycleUsdMantissa,
112+
currentEstimatedTotalUsdMantissa: payload.pendingPool.currentEstimatedTotalUsdMantissa,
102113
byRewardToken: payload.pendingPool.byRewardToken.map(token => ({
103114
rewardTokenAddress: token.rewardTokenAddress,
104115
totalCurrentCycleUsdMantissa: token.totalCurrentCycleUsdMantissa,

apps/evm/src/libs/translations/translations/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,8 @@
13571357
},
13581358
"title": "Prime leaderboard",
13591359
"totalRewards": {
1360-
"title": "Total Prime rewards distributed this cycle"
1360+
"title": "Total Prime rewards distributed",
1361+
"totalPoolLabel": "of <Highlight>{{amount}}</Highlight> total rewards this cycle"
13611362
},
13621363
"userRewards": {
13631364
"eligibleMessage": "You are currently eligible for sharing the Prime rewards during this cycle. Supply assets below to share the rewards.",

apps/evm/src/libs/translations/translations/ja.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,8 @@
13571357
},
13581358
"title": "Prime リーダーボード",
13591359
"totalRewards": {
1360-
"title": "今サイクルに分配された Prime 報酬の総額"
1360+
"title": "分配された Prime 報酬の総額",
1361+
"totalPoolLabel": "今サイクルの総報酬 <Highlight>{{amount}}</Highlight> のうち"
13611362
},
13621363
"userRewards": {
13631364
"eligibleMessage": "今サイクルで Prime 報酬を分け合う対象になっています。下記の資産を供給して報酬を獲得しましょう。",

apps/evm/src/libs/translations/translations/th.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,8 @@
13571357
},
13581358
"title": "กระดานผู้นำ Prime",
13591359
"totalRewards": {
1360-
"title": "รางวัล Prime ทั้งหมดที่แจกในรอบนี้"
1360+
"title": "รางวัล Prime ทั้งหมดที่แจก",
1361+
"totalPoolLabel": "จากทั้งหมด <Highlight>{{amount}}</Highlight> ในรอบนี้"
13611362
},
13621363
"userRewards": {
13631364
"eligibleMessage": "คุณมีสิทธิ์ร่วมรับรางวัล Prime ในรอบนี้ จัดหาสินทรัพย์ด้านล่างเพื่อรับรางวัล",

apps/evm/src/libs/translations/translations/tr.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,8 @@
13571357
},
13581358
"title": "Prime lider tablosu",
13591359
"totalRewards": {
1360-
"title": "Bu döngüde dağıtılan toplam Prime ödülü"
1360+
"title": "Dağıtılan toplam Prime ödülü",
1361+
"totalPoolLabel": "bu döngüdeki toplam <Highlight>{{amount}}</Highlight> ödülden"
13611362
},
13621363
"userRewards": {
13631364
"eligibleMessage": "Bu döngüde Prime ödüllerini paylaşmaya uygunsun. Ödülleri paylaşmak için aşağıdan varlık sağla.",

apps/evm/src/libs/translations/translations/vi.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,8 @@
13571357
},
13581358
"title": "Bảng xếp hạng Prime",
13591359
"totalRewards": {
1360-
"title": "Tổng thưởng Prime đã phân phối trong chu kỳ này"
1360+
"title": "Tổng thưởng Prime đã phân phối",
1361+
"totalPoolLabel": "trên tổng <Highlight>{{amount}}</Highlight> phần thưởng chu kỳ này"
13611362
},
13621363
"userRewards": {
13631364
"eligibleMessage": "Bạn hiện đủ điều kiện chia sẻ phần thưởng Prime trong chu kỳ này. Hãy cung cấp tài sản bên dưới để nhận phần thưởng.",

apps/evm/src/libs/translations/translations/zh-Hans.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,8 @@
13571357
},
13581358
"title": "Prime 排行榜",
13591359
"totalRewards": {
1360-
"title": "本周期已分配的 Prime 总奖励"
1360+
"title": "已分配的 Prime 总奖励",
1361+
"totalPoolLabel": "本周期总奖励 <Highlight>{{amount}}</Highlight>"
13611362
},
13621363
"userRewards": {
13631364
"eligibleMessage": "你在本周期已具备分享 Prime 奖励的资格。在下方供给资产以分享奖励。",

apps/evm/src/libs/translations/translations/zh-Hant.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,8 @@
13571357
},
13581358
"title": "Prime 排行榜",
13591359
"totalRewards": {
1360-
"title": "本週期已分配的 Prime 總獎勵"
1360+
"title": "已分配的 Prime 總獎勵",
1361+
"totalPoolLabel": "本週期總獎勵 <Highlight>{{amount}}</Highlight>"
13611362
},
13621363
"userRewards": {
13631364
"eligibleMessage": "你在本週期已具備分享 Prime 獎勵的資格。在下方供給資產以分享獎勵。",

0 commit comments

Comments
 (0)