From 599fc6d872e64da4fccecdea9274587e61447a13 Mon Sep 17 00:00:00 2001 From: Rick Date: Tue, 5 Dec 2023 16:31:49 +0330 Subject: [PATCH 1/5] feat: change btc explorer to mempool --- apps/frontend/src/constants/infrastructure.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/frontend/src/constants/infrastructure.ts b/apps/frontend/src/constants/infrastructure.ts index 2729be1d5..c9ac8039d 100644 --- a/apps/frontend/src/constants/infrastructure.ts +++ b/apps/frontend/src/constants/infrastructure.ts @@ -37,8 +37,8 @@ export const RSK_EXPLORER = { }; export const BTC_EXPLORER = { - [Environments.Mainnet]: 'https://live.blockcypher.com/btc', - [Environments.Testnet]: 'https://live.blockcypher.com/btc-testnet', + [Environments.Mainnet]: 'https://mempool.space', + [Environments.Testnet]: 'https://mempool.space/testnet', }; export const GRAPH_WRAPPER = { From bc4f36da9b424dd005420008cdcb33623e10d1a1 Mon Sep 17 00:00:00 2001 From: Rick Date: Tue, 5 Dec 2023 16:32:31 +0330 Subject: [PATCH 2/5] fix: Replace useTranslation() hook usage with direct "t" import --- .../3_organisms/FundingHistoryFrame/FundingHistoryFrame.tsx | 5 ++--- .../StakingDelegateChanges/StakingDelegateChanges.tsx | 4 +--- .../StakingExtendedDuration/StakingExtendedDuration.tsx | 4 +--- .../components/StakingHistory/StakingHistory.tsx | 4 +--- .../components/StakingWithdraws/StakingWithdraws.tsx | 4 +--- .../VestingDelegateChanges/VestingDelegateChanges.tsx | 4 +--- 6 files changed, 7 insertions(+), 18 deletions(-) diff --git a/apps/frontend/src/app/3_organisms/FundingHistoryFrame/FundingHistoryFrame.tsx b/apps/frontend/src/app/3_organisms/FundingHistoryFrame/FundingHistoryFrame.tsx index b4a5212d0..8673d4307 100644 --- a/apps/frontend/src/app/3_organisms/FundingHistoryFrame/FundingHistoryFrame.tsx +++ b/apps/frontend/src/app/3_organisms/FundingHistoryFrame/FundingHistoryFrame.tsx @@ -1,7 +1,7 @@ import React, { FC, useCallback, useEffect, useMemo, useState } from 'react'; +import { t } from 'i18next'; import { nanoid } from 'nanoid'; -import { useTranslation } from 'react-i18next'; import { NotificationType, @@ -40,7 +40,6 @@ import { useGetFundingHistory } from './hooks/useGetFundingHistory'; const pageSize = DEFAULT_HISTORY_FRAME_PAGE_SIZE; export const FundingHistoryFrame: FC = () => { - const { t } = useTranslation(); const { account } = useAccount(); const { addNotification } = useNotificationContext(); const { value: block } = useBlockNumber(); @@ -152,7 +151,7 @@ export const FundingHistoryFrame: FC = () => { token: BITCOIN, txHash: item.txHash, })); - }, [t, account, addNotification, getFundingHistory, orderOptions]); + }, [account, addNotification, getFundingHistory, orderOptions]); useEffect(() => { setPage(0); diff --git a/apps/frontend/src/app/3_organisms/StakingHistoryFrame/components/StakingDelegateChanges/StakingDelegateChanges.tsx b/apps/frontend/src/app/3_organisms/StakingHistoryFrame/components/StakingDelegateChanges/StakingDelegateChanges.tsx index d193428fe..62e7c90ea 100644 --- a/apps/frontend/src/app/3_organisms/StakingHistoryFrame/components/StakingDelegateChanges/StakingDelegateChanges.tsx +++ b/apps/frontend/src/app/3_organisms/StakingHistoryFrame/components/StakingDelegateChanges/StakingDelegateChanges.tsx @@ -1,7 +1,7 @@ import React, { FC, useCallback, useEffect, useMemo, useState } from 'react'; +import { t } from 'i18next'; import { nanoid } from 'nanoid'; -import { useTranslation } from 'react-i18next'; import { ErrorBadge, @@ -41,7 +41,6 @@ export const StakingDelegateChanges: FC = ({ onChangeHistoryType, selectedHistoryType, }) => { - const { t } = useTranslation(); const { account } = useAccount(); const { addNotification } = useNotificationContext(); @@ -117,7 +116,6 @@ export const StakingDelegateChanges: FC = ({ orderOptions.orderBy, orderOptions.orderDirection, addNotification, - t, ]); useEffect(() => { diff --git a/apps/frontend/src/app/3_organisms/StakingHistoryFrame/components/StakingExtendedDuration/StakingExtendedDuration.tsx b/apps/frontend/src/app/3_organisms/StakingHistoryFrame/components/StakingExtendedDuration/StakingExtendedDuration.tsx index 1d75baa78..50cfca475 100644 --- a/apps/frontend/src/app/3_organisms/StakingHistoryFrame/components/StakingExtendedDuration/StakingExtendedDuration.tsx +++ b/apps/frontend/src/app/3_organisms/StakingHistoryFrame/components/StakingExtendedDuration/StakingExtendedDuration.tsx @@ -1,7 +1,7 @@ import React, { FC, useCallback, useEffect, useMemo, useState } from 'react'; +import { t } from 'i18next'; import { nanoid } from 'nanoid'; -import { useTranslation } from 'react-i18next'; import { ErrorBadge, @@ -42,7 +42,6 @@ export const StakingExtendedDuration: FC = ({ onChangeHistoryType, selectedHistoryType, }) => { - const { t } = useTranslation(); const { account } = useAccount(); const { addNotification } = useNotificationContext(); @@ -120,7 +119,6 @@ export const StakingExtendedDuration: FC = ({ orderOptions.orderBy, orderOptions.orderDirection, addNotification, - t, ]); useEffect(() => { diff --git a/apps/frontend/src/app/3_organisms/StakingHistoryFrame/components/StakingHistory/StakingHistory.tsx b/apps/frontend/src/app/3_organisms/StakingHistoryFrame/components/StakingHistory/StakingHistory.tsx index df361cf91..a38c8e31e 100644 --- a/apps/frontend/src/app/3_organisms/StakingHistoryFrame/components/StakingHistory/StakingHistory.tsx +++ b/apps/frontend/src/app/3_organisms/StakingHistoryFrame/components/StakingHistory/StakingHistory.tsx @@ -1,7 +1,7 @@ import React, { FC, useCallback, useEffect, useMemo, useState } from 'react'; +import { t } from 'i18next'; import { nanoid } from 'nanoid'; -import { useTranslation } from 'react-i18next'; import { ErrorBadge, @@ -42,7 +42,6 @@ export const StakingHistory: FC = ({ onChangeHistoryType, selectedHistoryType, }) => { - const { t } = useTranslation(); const { account } = useAccount(); const { addNotification } = useNotificationContext(); @@ -119,7 +118,6 @@ export const StakingHistory: FC = ({ orderOptions.orderBy, orderOptions.orderDirection, addNotification, - t, ]); useEffect(() => { diff --git a/apps/frontend/src/app/3_organisms/StakingHistoryFrame/components/StakingWithdraws/StakingWithdraws.tsx b/apps/frontend/src/app/3_organisms/StakingHistoryFrame/components/StakingWithdraws/StakingWithdraws.tsx index 32ce6e5b8..38a9582bd 100644 --- a/apps/frontend/src/app/3_organisms/StakingHistoryFrame/components/StakingWithdraws/StakingWithdraws.tsx +++ b/apps/frontend/src/app/3_organisms/StakingHistoryFrame/components/StakingWithdraws/StakingWithdraws.tsx @@ -1,7 +1,7 @@ import React, { FC, useCallback, useEffect, useMemo, useState } from 'react'; +import { t } from 'i18next'; import { nanoid } from 'nanoid'; -import { useTranslation } from 'react-i18next'; import { ErrorBadge, @@ -42,7 +42,6 @@ export const StakingWithdraws: FC = ({ onChangeHistoryType, selectedHistoryType, }) => { - const { t } = useTranslation(); const { account } = useAccount(); const { addNotification } = useNotificationContext(); @@ -119,7 +118,6 @@ export const StakingWithdraws: FC = ({ orderOptions.orderBy, orderOptions.orderDirection, addNotification, - t, ]); useEffect(() => { diff --git a/apps/frontend/src/app/3_organisms/StakingHistoryFrame/components/VestingDelegateChanges/VestingDelegateChanges.tsx b/apps/frontend/src/app/3_organisms/StakingHistoryFrame/components/VestingDelegateChanges/VestingDelegateChanges.tsx index 504503d1b..b65282225 100644 --- a/apps/frontend/src/app/3_organisms/StakingHistoryFrame/components/VestingDelegateChanges/VestingDelegateChanges.tsx +++ b/apps/frontend/src/app/3_organisms/StakingHistoryFrame/components/VestingDelegateChanges/VestingDelegateChanges.tsx @@ -1,7 +1,7 @@ import React, { FC, useCallback, useEffect, useMemo, useState } from 'react'; +import { t } from 'i18next'; import { nanoid } from 'nanoid'; -import { useTranslation } from 'react-i18next'; import { ErrorBadge, @@ -41,7 +41,6 @@ export const VestingDelegateChanges: FC = ({ onChangeHistoryType, selectedHistoryType, }) => { - const { t } = useTranslation(); const { account } = useAccount(); const { addNotification } = useNotificationContext(); @@ -116,7 +115,6 @@ export const VestingDelegateChanges: FC = ({ orderOptions.orderBy, orderOptions.orderDirection, addNotification, - t, ]); useEffect(() => { From 6aefd7974f40b5e945a7225c56eabca504ae0742 Mon Sep 17 00:00:00 2001 From: Rick <81699526+rick23p@users.noreply.github.com> Date: Tue, 5 Dec 2023 16:36:31 +0330 Subject: [PATCH 3/5] Create ten-shirts-act.md --- .changeset/ten-shirts-act.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/ten-shirts-act.md diff --git a/.changeset/ten-shirts-act.md b/.changeset/ten-shirts-act.md new file mode 100644 index 000000000..d7af840b0 --- /dev/null +++ b/.changeset/ten-shirts-act.md @@ -0,0 +1,5 @@ +--- +"frontend": patch +--- + +SOV-3416: Use mempool.space instead of BlockCypher for bitcoin block explorer links From 91ca51c54d041e41cbbb564bfcdecaac7aa0f490 Mon Sep 17 00:00:00 2001 From: soulBit Date: Tue, 5 Dec 2023 15:49:09 +0000 Subject: [PATCH 4/5] chore: update changeset message --- .changeset/ten-shirts-act.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.changeset/ten-shirts-act.md b/.changeset/ten-shirts-act.md index d7af840b0..4869af784 100644 --- a/.changeset/ten-shirts-act.md +++ b/.changeset/ten-shirts-act.md @@ -3,3 +3,4 @@ --- SOV-3416: Use mempool.space instead of BlockCypher for bitcoin block explorer links +Fix broken localisations in history tables From fd5d7ddcc47c3fd7be698e19263a1ee7ea556c01 Mon Sep 17 00:00:00 2001 From: Rick Date: Wed, 6 Dec 2023 18:18:35 +0330 Subject: [PATCH 5/5] trigger rebuild --- .../app/3_organisms/FundingHistoryFrame/FundingHistoryFrame.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/frontend/src/app/3_organisms/FundingHistoryFrame/FundingHistoryFrame.tsx b/apps/frontend/src/app/3_organisms/FundingHistoryFrame/FundingHistoryFrame.tsx index 8673d4307..4d26a913a 100644 --- a/apps/frontend/src/app/3_organisms/FundingHistoryFrame/FundingHistoryFrame.tsx +++ b/apps/frontend/src/app/3_organisms/FundingHistoryFrame/FundingHistoryFrame.tsx @@ -122,7 +122,6 @@ export const FundingHistoryFrame: FC = () => { const fundingData = funding.reduce((acc: FundingHistoryType[], item) => { const rows = parseData(item as BitcoinTransfer); - // make sure rows has at least 2 elements before using spread operator if (rows.length >= 2) { acc.push(