diff --git a/app/src/renderer/components/staking/LiDelegate.vue b/app/src/renderer/components/staking/LiDelegate.vue index cbf0dd325b..b88711b425 100644 --- a/app/src/renderer/components/staking/LiDelegate.vue +++ b/app/src/renderer/components/staking/LiDelegate.vue @@ -46,6 +46,7 @@ export default { }, vpTotal () { return this.delegates + .slice() .sort((a, b) => b.voting_power - a.voting_power) .slice(0, 100) .reduce((sum, v) => sum + v.voting_power, 0) diff --git a/test/unit/specs/LiDelegate.spec.js b/test/unit/specs/LiDelegate.spec.js index 50322ab096..f582d94a0c 100644 --- a/test/unit/specs/LiDelegate.spec.js +++ b/test/unit/specs/LiDelegate.spec.js @@ -54,15 +54,15 @@ describe('LiDelegate', () => { }) it('should show the voting power', () => { - expect(wrapper.html()).toContain('75%') + expect(wrapper.html()).toContain('25%') }) it('should show the number of bonded atoms', () => { - expect(wrapper.html()).toContain('30,000') + expect(wrapper.html()).toContain('10,000') }) it('should show the relative voting power as a bar', () => { - expect(wrapper.vm.$el.querySelector('.voting_power .bar').style.width).toBe('100%') + expect(wrapper.vm.$el.querySelector('.voting_power .bar').style.width).toBe('33%') }) it('should add to cart', () => {