diff --git a/apps/api/src/app/controllers/lotteries/list.controller.ts b/apps/api/src/app/controllers/lotteries/list.controller.ts
index 9b9cd8fc5..cda18adb5 100644
--- a/apps/api/src/app/controllers/lotteries/list.controller.ts
+++ b/apps/api/src/app/controllers/lotteries/list.controller.ts
@@ -9,18 +9,18 @@ const lotteries = [
description:
'In the realms of Forest Knight, many items are digital collectibles allowing the players a full ownership. You as a player can decide what you want to do with them, use them, trade them or combine them! A new frontier of gaming is here.',
participantCount: 100,
- winners: {
- THX02G6NMUMU0052024: Rewards.ForestKnight.RunestoneOfTheEclipse,
- THXSUR9F62ZRE052024: Rewards.ForestKnight.RunestoneOfTheEclipse,
- THXT51NWPZY0Z052024: Rewards.ForestKnight.RunestoneOfTheEclipse,
- THXH7TQX5FETL052024: Rewards.ForestKnight.RunestoneOfTheEclipse,
- THXMYH9D2GFAI052024: Rewards.ForestKnight.RunestoneOfTheEclipse,
- THXNDZDDSSI3O052024: Rewards.ForestKnight.RunestoneOfTheEclipse,
- THXEUIAY54H01052024: Rewards.ForestKnight.RunestoneOfTheEclipse,
- THXV1BVL7XZBF052024: Rewards.ForestKnight.RunestoneOfTheEclipse,
- THXBI11LY2C2P052024: Rewards.ForestKnight.RunestoneOfTheEclipse,
- THXNT5QAUHBNN052024: Rewards.ForestKnight.RunestoneOfTheEclipse,
- },
+ winners: [
+ { code: 'THX02G6NMUMU0052024', reward: Rewards.ForestKnight.RunestoneOfTheEclipse },
+ { code: 'THXSUR9F62ZRE052024', reward: Rewards.ForestKnight.RunestoneOfTheEclipse },
+ { code: 'THXT51NWPZY0Z052024', reward: Rewards.ForestKnight.RunestoneOfTheEclipse },
+ { code: 'THXH7TQX5FETL052024', reward: Rewards.ForestKnight.BigBagOfKnight },
+ { code: 'THXMYH9D2GFAI052024', reward: Rewards.ForestKnight.BigBagOfKnight },
+ { code: 'THXNDZDDSSI3O052024', reward: Rewards.ForestKnight.BigBagOfKnight },
+ { code: 'THXEUIAY54H01052024', reward: Rewards.ForestKnight.BigBagOfKnight },
+ { code: 'THXV1BVL7XZBF052024', reward: Rewards.ForestKnight.ClockworkCodex },
+ { code: 'THXBI11LY2C2P052024', reward: Rewards.ForestKnight.ClockworkCodex },
+ { code: 'THXNT5QAUHBNN052024', reward: Rewards.ForestKnight.ClockworkCodex },
+ ],
},
];
diff --git a/apps/api/src/app/services/LotteryService.ts b/apps/api/src/app/services/LotteryService.ts
index 8c1760d09..90d2ebe95 100644
--- a/apps/api/src/app/services/LotteryService.ts
+++ b/apps/api/src/app/services/LotteryService.ts
@@ -34,7 +34,9 @@ export default class LotteryService {
lotteries.map(async (lottery) => {
try {
// Get CouponCode for winning codes
- const codes = await CouponCode.find({ code: { $in: lottery.winners } });
+ const codes = await CouponCode.find({
+ code: { $in: lottery.winners.map((winner) => winner.code) },
+ });
// Get subs for winning codes
const subs = codes.map((code) => code.sub);
@@ -44,16 +46,15 @@ export default class LotteryService {
return {
...lottery,
- winners: lottery.winners.map((winner: string) => {
- const code = codes.find(({ code }) => code === winner);
+ winners: lottery.winners.map((winner) => {
+ const code = codes.find(({ code }) => code === winner.code);
const account = accounts.find((a) => a.sub === code.sub);
return {
- code,
+ ...winner,
account: {
avatarURL: account.profileImg,
username: account.username,
},
- reward: Rewards.ForestKnight.RunestoneOfTheEclipse,
};
}),
};
diff --git a/apps/app/src/components/button/BaseButtonLiquidityLock.vue b/apps/app/src/components/button/BaseButtonLiquidityLock.vue
index b09eee7bf..1c384ff3e 100644
--- a/apps/app/src/components/button/BaseButtonLiquidityLock.vue
+++ b/apps/app/src/components/button/BaseButtonLiquidityLock.vue
@@ -14,7 +14,6 @@ import { useVeStore } from '@thxnetwork/app/stores/VE';
import { useAccountStore } from '@thxnetwork/app/stores/Account';
import { contractNetworks } from '../../config/constants';
import { ChainId } from '@thxnetwork/common/enums';
-import { track } from '@thxnetwork/common/mixpanel';
export default defineComponent({
name: 'BaseButtonLiquidityLock',
diff --git a/apps/app/src/components/card/BaseCardLottery.vue b/apps/app/src/components/card/BaseCardLottery.vue
index 225e1497d..85acb4fda 100644
--- a/apps/app/src/components/card/BaseCardLottery.vue
+++ b/apps/app/src/components/card/BaseCardLottery.vue
@@ -40,7 +40,7 @@