Skip to content

Commit

Permalink
fix: Update component on total stake change
Browse files Browse the repository at this point in the history
  • Loading branch information
gaquarius committed Jan 25, 2024
1 parent 60e5101 commit 979dd31
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/library/ValidatorList/ValidatorItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ export const ValidatorItemInner = (props: ValidatorItemProps) => {

export class ValidatorItem extends React.Component<ValidatorItemProps> {
shouldComponentUpdate(nextProps: ValidatorItemProps) {
return this.props.validator.address !== nextProps.validator.address;
return (
this.props.validator.address !== nextProps.validator.address ||
this.props.validator.totalStake !== nextProps.validator.totalStake
);
}

render() {
Expand Down

0 comments on commit 979dd31

Please sign in to comment.