From 6ba3494b1488d03ac82958814d81a2d6db77dcb0 Mon Sep 17 00:00:00 2001 From: Karolina Kosiorowska Date: Mon, 22 Jan 2024 13:26:51 +0100 Subject: [PATCH] Minor improvements - added comments `TODO` - updated mock data - updated `TransactionInfo `type --- .../TransactionHistory/Protocol/mock-transactions.ts | 7 ++----- dapp/src/components/shared/StatusInfo/index.tsx | 2 ++ dapp/src/components/shared/ViewInBlockExplorer/index.tsx | 1 + dapp/src/types/transaction.ts | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dapp/src/components/TransactionHistory/Protocol/mock-transactions.ts b/dapp/src/components/TransactionHistory/Protocol/mock-transactions.ts index 7bc355c11..9b7cbb099 100644 --- a/dapp/src/components/TransactionHistory/Protocol/mock-transactions.ts +++ b/dapp/src/components/TransactionHistory/Protocol/mock-transactions.ts @@ -3,7 +3,7 @@ import { StakeHistory } from "#/types" export const TRANSACTIONS: StakeHistory[] = [ { callTx: { - timestamp: 1700179973, + timestamp: 1705918304, chain: "bitcoin", action: "stake", asset: { @@ -41,7 +41,7 @@ export const TRANSACTIONS: StakeHistory[] = [ account: "2MsjRekULh27YSM17p8gSNkVvbXw6wc4kcZ", txHash: "925c8910775c1842fbcfee782104d0d9934dde6f0ca00d393858fcbe8ac90eb7", - status: "pending", + status: "syncing", }, receiptTx: { timestamp: 1700578973, @@ -52,9 +52,6 @@ export const TRANSACTIONS: StakeHistory[] = [ amount: 614000000, }, account: "0x208e94d5661a73360d9387d3ca169e5c130090cd", - txHash: - "0xf612b8999e765f9631c5e32a9f424a097936da1c527953e78dc8da20f65bc3ee", - status: "pending", }, }, { diff --git a/dapp/src/components/shared/StatusInfo/index.tsx b/dapp/src/components/shared/StatusInfo/index.tsx index d2f4f5726..ef7338311 100644 --- a/dapp/src/components/shared/StatusInfo/index.tsx +++ b/dapp/src/components/shared/StatusInfo/index.tsx @@ -18,6 +18,8 @@ type StatusInfoProps = { withIcon?: boolean } & TextProps +// TODO: Update component for syncing status. +// Add a timer when the logic is ready. export default function StatusInfo({ status, withDefaultColor, diff --git a/dapp/src/components/shared/ViewInBlockExplorer/index.tsx b/dapp/src/components/shared/ViewInBlockExplorer/index.tsx index 15a5ca21b..524ce8024 100644 --- a/dapp/src/components/shared/ViewInBlockExplorer/index.tsx +++ b/dapp/src/components/shared/ViewInBlockExplorer/index.tsx @@ -19,6 +19,7 @@ function ViewInBlockExplorer({ }: ViewInBlockExplorerProps) { const { link, title } = createLinkToBlockExplorerForChain(chain, id, type) + // TODO: Update when ButtonLink is ready return ( {text ?? title} diff --git a/dapp/src/types/transaction.ts b/dapp/src/types/transaction.ts index 7285acedd..dce957fe7 100644 --- a/dapp/src/types/transaction.ts +++ b/dapp/src/types/transaction.ts @@ -17,7 +17,8 @@ export type TransactionInfo = { asset: Asset account: string txHash?: string - status: TransactionInfoStatus + // TODO: Update when statuses for transactions are determined + status?: TransactionInfoStatus } export type StakeHistory = {