@@ -226,6 +226,7 @@ export function ActivityRewardsScreen() {
226
226
< DistributionRequirementsCard distribution = { distributions [ selectedDistributionIndex ] } />
227
227
< SendPerksCards distribution = { distributions [ selectedDistributionIndex ] } />
228
228
< MultiplierCards distribution = { distributions [ selectedDistributionIndex ] } />
229
+ < RewardsProgressCard distribution = { distributions [ selectedDistributionIndex ] } />
229
230
< ClaimableRewardsCard distribution = { distributions [ selectedDistributionIndex ] } />
230
231
</ YStack >
231
232
) }
@@ -588,10 +589,83 @@ const MultiplierCard = ({ children }: PropsWithChildren<CardProps>) => {
588
589
)
589
590
}
590
591
592
+ const RewardsProgressCard = ( {
593
+ distribution,
594
+ } : {
595
+ distribution : UseDistributionsResultData [ number ]
596
+ } ) => {
597
+ const shareAmount = distribution . distribution_shares ?. [ 0 ] ?. amount
598
+ const slashedAmount = distribution . distribution_shares ?. [ 0 ] ?. amount_after_slash
599
+
600
+ if ( ! shareAmount || ! slashedAmount ) return null
601
+
602
+ const percentage = Math . floor ( ( Number ( slashedAmount ) / Number ( shareAmount ) ) * 100 )
603
+
604
+ return (
605
+ < YStack f = { 1 } w = { '100%' } gap = "$5" >
606
+ < H3 fontWeight = { '600' } color = { '$color12' } >
607
+ Progress
608
+ </ H3 >
609
+ < Card br = { '$6' } p = "$7" w = { '100%' } >
610
+ < YStack gap = "$4" w = "100%" >
611
+ < XStack jc = "space-between" ai = "center" >
612
+ < Paragraph color = "$color11" > Current Rewards</ Paragraph >
613
+ < Paragraph
614
+ ff = { '$mono' }
615
+ py = { '$size.0.5' }
616
+ px = { '$size.0.9' }
617
+ borderWidth = { 1 }
618
+ borderColor = { '$primary' }
619
+ $theme-light = { { borderColor : '$color12' } }
620
+ borderRadius = { '$4' }
621
+ >
622
+ { percentage } %
623
+ </ Paragraph >
624
+ </ XStack >
625
+
626
+ < Stack w = "100%" h = "$1" br = "$10" bc = "$color3" overflow = "hidden" >
627
+ < Stack
628
+ w = { `${ percentage } %` }
629
+ h = "100%"
630
+ br = "$10"
631
+ animation = "quick"
632
+ $theme-light = { {
633
+ bc : '$color12' ,
634
+ } }
635
+ $theme-dark = { {
636
+ bc : '$primary' ,
637
+ } }
638
+ />
639
+ </ Stack >
640
+
641
+ < XStack jc = "space-between" ai = "center" >
642
+ < YStack >
643
+ < Paragraph color = "$color10" size = "$3" >
644
+ Current
645
+ </ Paragraph >
646
+ < Paragraph fontFamily = "$mono" color = "$color12" >
647
+ { formatAmount ( slashedAmount , 9 , 0 ) } SEND
648
+ </ Paragraph >
649
+ </ YStack >
650
+ < YStack ai = "flex-end" >
651
+ < Paragraph color = "$color10" size = "$3" >
652
+ Estimated Maximum
653
+ </ Paragraph >
654
+ < Paragraph fontFamily = "$mono" color = "$color12" >
655
+ { formatAmount ( shareAmount , 9 , 0 ) } SEND
656
+ </ Paragraph >
657
+ </ YStack >
658
+ </ XStack >
659
+ </ YStack >
660
+ </ Card >
661
+ </ YStack >
662
+ )
663
+ }
664
+
591
665
const ClaimableRewardsCard = ( {
592
666
distribution,
593
667
} : { distribution : UseDistributionsResultData [ number ] } ) => {
594
- const shareAmount = distribution . distribution_shares ?. [ 0 ] ?. amount
668
+ const shareAmount = distribution . distribution_shares ?. [ 0 ] ?. amount_after_slash
595
669
if ( shareAmount === undefined || shareAmount === 0 ) return null
596
670
const now = new Date ( )
597
671
const isQualificationOver = distribution . qualification_end < now
0 commit comments