From 035e04bd45ebe70f19235defffedd7f2d543f3c6 Mon Sep 17 00:00:00 2001 From: DaMandal0rian Date: Mon, 6 May 2024 23:51:26 +0300 Subject: [PATCH] fixes --- lib/hooks/useConfigSentry.tsx | 16 ---------------- lib/tx/sortTxs.ts | 21 --------------------- 2 files changed, 37 deletions(-) delete mode 100644 lib/hooks/useConfigSentry.tsx delete mode 100644 lib/tx/sortTxs.ts diff --git a/lib/hooks/useConfigSentry.tsx b/lib/hooks/useConfigSentry.tsx deleted file mode 100644 index 2f8f4022c2..0000000000 --- a/lib/hooks/useConfigSentry.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import * as Sentry from '@sentry/react'; -import React from 'react'; - -import { config, configureScope } from 'configs/sentry/react'; - -export default function useConfigSentry() { - React.useEffect(() => { - if (!config) { - return; - } - - // gotta init sentry in browser - Sentry.init(config); - Sentry.configureScope(configureScope); - }, []); -} diff --git a/lib/tx/sortTxs.ts b/lib/tx/sortTxs.ts deleted file mode 100644 index 776638afe7..0000000000 --- a/lib/tx/sortTxs.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { Transaction } from 'types/api/transaction'; -import type { Sort } from 'types/client/txs-sort'; - -import compareBns from 'lib/bigint/compareBns'; - -const sortTxs = (sorting?: Sort) => (tx1: Transaction, tx2: Transaction) => { - switch (sorting) { - case 'val-desc': - return compareBns(tx1.value, tx2.value); - case 'val-asc': - return compareBns(tx2.value, tx1.value); - case 'fee-desc': - return compareBns(tx1.fee.value, tx2.fee.value); - case 'fee-asc': - return compareBns(tx2.fee.value, tx1.fee.value); - default: - return 0; - } -}; - -export default sortTxs;