Skip to content

Commit

Permalink
refactor: (rewards-button) zero token name to meow
Browse files Browse the repository at this point in the history
  • Loading branch information
domw30 committed Oct 20, 2023
1 parent 694beec commit 8819e64
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/components/rewards-button/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('rewards-button', () => {
const allProps: Properties = {
isFirstTimeLogin: false,
isMessengerFullScreen: false,
zeroPreviousDay: '',
meowPreviousDay: '',
isRewardsLoading: false,
showRewardsInTooltip: false,
showRewardsInPopup: false,
Expand All @@ -30,14 +30,14 @@ describe('rewards-button', () => {
});

it('rewards tooltip popup is not rendered if messenger not fullscreen', function () {
const wrapper = subject({ zeroPreviousDay: '9000000000000000000' });
const wrapper = subject({ meowPreviousDay: '9000000000000000000' });
const tooltipPopup = wrapper.find(TooltipPopup);
expect(tooltipPopup.prop('open')).toBe(false);
});

it('rewards tooltip popup is not rendered if first time log in', function () {
const wrapper = subject({
zeroPreviousDay: '9000000000000000000',
meowPreviousDay: '9000000000000000000',
isRewardsLoading: false,
isFirstTimeLogin: true,
});
Expand All @@ -47,7 +47,7 @@ describe('rewards-button', () => {

it('does not render rewards tooltip popup if not in full screen', function () {
const wrapper = subject({
zeroPreviousDay: '9000000000000000000',
meowPreviousDay: '9000000000000000000',
isRewardsLoading: false,
showRewardsInTooltip: true,
isMessengerFullScreen: false,
Expand All @@ -58,7 +58,7 @@ describe('rewards-button', () => {

it('rewards tooltip popup is rendered upon load', function () {
const wrapper = subject({
zeroPreviousDay: '9000000000000000000',
meowPreviousDay: '9000000000000000000',
isRewardsLoading: false,
showRewardsInTooltip: true,
isMessengerFullScreen: true,
Expand All @@ -71,7 +71,7 @@ describe('rewards-button', () => {
it('calls closeRewardsTooltip if TooltipPopup is closed', function () {
const closeRewardsTooltip = jest.fn();
const wrapper = subject({
zeroPreviousDay: '1000000000000000000',
meowPreviousDay: '1000000000000000000',
isRewardsLoading: false,
showRewardsInTooltip: true,
isMessengerFullScreen: true,
Expand Down
4 changes: 2 additions & 2 deletions src/components/rewards-button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface Properties {
isMessengerFullScreen: boolean;
hasLoadedConversation: boolean;

zeroPreviousDay: string;
meowPreviousDay: string;
isRewardsLoading: boolean;
showRewardsInTooltip: boolean;
showRewardsInPopup: boolean;
Expand All @@ -35,7 +35,7 @@ export class RewardsButton extends React.Component<Properties> {
open={!this.props.isRewardsLoading && this.props.showRewardsInTooltip && this.props.isMessengerFullScreen}
align='center'
side='right'
content={`You’ve earned ${formatWeiAmount(this.props.zeroPreviousDay)} MEOW today`}
content={`You’ve earned ${formatWeiAmount(this.props.meowPreviousDay)} MEOW today`}
onClose={this.props.closeRewardsTooltip}
>
<div className={c('')}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/rewards-container/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class RewardsContainer extends React.Component<Properties, State> {
<RewardsButton
openRewards={this.openRewards}
closeRewardsTooltip={this.closeRewardsTooltip}
zeroPreviousDay={this.props.meowPreviousDay}
meowPreviousDay={this.props.meowPreviousDay}
isRewardsLoading={this.props.isRewardsLoading}
isFirstTimeLogin={this.props.isFirstTimeLogin}
isRewardsPopupOpen={this.state.isRewardsPopupOpen}
Expand Down

0 comments on commit 8819e64

Please sign in to comment.