Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOV-3416: Use mempool.space instead of BlockCypher for bitcoin block explorer links #711

Merged
merged 5 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/ten-shirts-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"frontend": patch
---

SOV-3416: Use mempool.space instead of BlockCypher for bitcoin block explorer links
Fix broken localisations in history tables
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -123,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(
Expand Down Expand Up @@ -152,7 +150,7 @@ export const FundingHistoryFrame: FC = () => {
token: BITCOIN,
txHash: item.txHash,
}));
}, [t, account, addNotification, getFundingHistory, orderOptions]);
}, [account, addNotification, getFundingHistory, orderOptions]);

useEffect(() => {
setPage(0);
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -41,7 +41,6 @@ export const StakingDelegateChanges: FC<StakingHistoryProps> = ({
onChangeHistoryType,
selectedHistoryType,
}) => {
const { t } = useTranslation();
const { account } = useAccount();
const { addNotification } = useNotificationContext();

Expand Down Expand Up @@ -117,7 +116,6 @@ export const StakingDelegateChanges: FC<StakingHistoryProps> = ({
orderOptions.orderBy,
orderOptions.orderDirection,
addNotification,
t,
]);

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -42,7 +42,6 @@ export const StakingExtendedDuration: FC<StakingHistoryProps> = ({
onChangeHistoryType,
selectedHistoryType,
}) => {
const { t } = useTranslation();
const { account } = useAccount();
const { addNotification } = useNotificationContext();

Expand Down Expand Up @@ -120,7 +119,6 @@ export const StakingExtendedDuration: FC<StakingHistoryProps> = ({
orderOptions.orderBy,
orderOptions.orderDirection,
addNotification,
t,
]);

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -42,7 +42,6 @@ export const StakingHistory: FC<StakingHistoryProps> = ({
onChangeHistoryType,
selectedHistoryType,
}) => {
const { t } = useTranslation();
const { account } = useAccount();
const { addNotification } = useNotificationContext();

Expand Down Expand Up @@ -119,7 +118,6 @@ export const StakingHistory: FC<StakingHistoryProps> = ({
orderOptions.orderBy,
orderOptions.orderDirection,
addNotification,
t,
]);

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -42,7 +42,6 @@ export const StakingWithdraws: FC<StakingHistoryProps> = ({
onChangeHistoryType,
selectedHistoryType,
}) => {
const { t } = useTranslation();
const { account } = useAccount();
const { addNotification } = useNotificationContext();

Expand Down Expand Up @@ -119,7 +118,6 @@ export const StakingWithdraws: FC<StakingHistoryProps> = ({
orderOptions.orderBy,
orderOptions.orderDirection,
addNotification,
t,
]);

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -41,7 +41,6 @@ export const VestingDelegateChanges: FC<StakingHistoryProps> = ({
onChangeHistoryType,
selectedHistoryType,
}) => {
const { t } = useTranslation();
const { account } = useAccount();
const { addNotification } = useNotificationContext();

Expand Down Expand Up @@ -116,7 +115,6 @@ export const VestingDelegateChanges: FC<StakingHistoryProps> = ({
orderOptions.orderBy,
orderOptions.orderDirection,
addNotification,
t,
]);

useEffect(() => {
Expand Down
4 changes: 2 additions & 2 deletions apps/frontend/src/constants/infrastructure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down