Skip to content

Commit

Permalink
fix: fix type issues
Browse files Browse the repository at this point in the history
remove old code
  • Loading branch information
Prithpal-Sooriya committed Jan 14, 2025
1 parent d8525a4 commit a9e2ad6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
1 change: 0 additions & 1 deletion app/util/notifications/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ export * from './types';
export * from './constants';
export * from './androidChannels';
export * from './settings';
export * from './hooks';
export * from './methods';
export * from './services';
21 changes: 0 additions & 21 deletions app/util/notifications/methods/common.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import {
formatMenuItemDate,
parseNotification,
getLeadingZeroCount,
formatAmount,
getUsdAmount,
} from './common';
import { strings } from '../../../../locales/i18n';
import { FirebaseMessagingTypes } from '@react-native-firebase/messaging';

describe('formatMenuItemDate', () => {
beforeAll(() => {
Expand Down Expand Up @@ -199,22 +197,3 @@ describe('getUsdAmount', () => {
expect(result).toBe('5M'); // Since 5000 Ether * $1000 = $5,000,000, formatted as '5M'
});
});

describe('parseNotification', () => {
it('parses notification', () => {
const notification = {
data: {
data: {
type: 'eth_received',
data: { kind: 'eth_received' },
},
},
} as unknown as FirebaseMessagingTypes.RemoteMessage;

expect(parseNotification(notification)).toEqual({
type: 'eth_received',
transaction: { kind: 'eth_received' },
duration: 5000,
});
});
});

0 comments on commit a9e2ad6

Please sign in to comment.