diff --git a/bun.lock b/bun.lock
index 98264ca..08e62c5 100644
--- a/bun.lock
+++ b/bun.lock
@@ -25,7 +25,7 @@
"clsx": "^2.1.1",
"date-fns": "^4.1.0",
"graphql": "^16.11.0",
- "human-readable-checksum": "./package/human-readable-checksum-0.3.0.tgz",
+ "human-readable-checksum": "./package/human-readable-checksum-0.2.0.tgz",
"lucide-react": "^0.516.0",
"nuqs": "2.4.3",
"react": "19.1.1",
@@ -1550,7 +1550,7 @@
"https-proxy-agent": ["https-proxy-agent@7.0.6", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="],
- "human-readable-checksum": ["human-readable-checksum@./package/human-readable-checksum-0.3.0.tgz", { "dependencies": { "pbkdf2": "^3.1.3" } }, "sha512-B1O/e+o+dzo4NPIS4RER+rRQis5SJh/oGNht+ZyFJ+YgJpEcWghJyV3fnTuA1m+2ucgExI3myldZ5JuJRj8eeA=="],
+ "human-readable-checksum": ["human-readable-checksum@./package/human-readable-checksum-0.2.0.tgz", { "dependencies": { "pbkdf2": "^3.1.3" } }],
"human-signals": ["human-signals@5.0.0", "", {}, "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ=="],
diff --git a/src/components/common/table-columns/ACCOUNT_BENEFICIARIES_COLUMNS.tsx b/src/components/common/table-columns/ACCOUNT_BENEFICIARIES_COLUMNS.tsx
index cf9ff2d..94676ec 100644
--- a/src/components/common/table-columns/ACCOUNT_BENEFICIARIES_COLUMNS.tsx
+++ b/src/components/common/table-columns/ACCOUNT_BENEFICIARIES_COLUMNS.tsx
@@ -8,7 +8,7 @@ import { formatMonetaryValue } from '@/utils/formatter';
const columnHelper = createColumnHelper();
export const ACCOUNT_BENEFICIARIES_COLUMNS = [
- columnHelper.accessor('node.who.id', {
+ columnHelper.accessor('who.id', {
id: 'id',
header: 'Identity',
cell: (props) => (
@@ -19,19 +19,19 @@ export const ACCOUNT_BENEFICIARIES_COLUMNS = [
),
enableSorting: false
}),
- columnHelper.accessor('node.who.free', {
+ columnHelper.accessor('who.free', {
id: 'free',
header: 'Free',
cell: (props) => formatMonetaryValue(props.getValue(), 5),
enableSorting: true
}),
- columnHelper.accessor('node.who.frozen', {
+ columnHelper.accessor('who.frozen', {
id: 'frozen',
header: 'Frozen',
cell: (props) => formatMonetaryValue(props.getValue(), 5),
enableSorting: true
}),
- columnHelper.accessor('node.who.reserved', {
+ columnHelper.accessor('who.reserved', {
id: 'reserved',
header: 'Reserved',
cell: (props) => formatMonetaryValue(props.getValue(), 5),
diff --git a/src/components/common/table-columns/ACCOUNT_CANCELLED_REVERSIBLE_COLUMNS.tsx b/src/components/common/table-columns/ACCOUNT_CANCELLED_REVERSIBLE_COLUMNS.tsx
deleted file mode 100644
index 88c4904..0000000
--- a/src/components/common/table-columns/ACCOUNT_CANCELLED_REVERSIBLE_COLUMNS.tsx
+++ /dev/null
@@ -1,85 +0,0 @@
-import { createColumnHelper } from '@tanstack/react-table';
-
-import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy';
-import { TimestampDisplay } from '@/components/ui/timestamp-display';
-import { RESOURCES } from '@/constants/resources';
-import type { AccountCancelledReversibleTransaction } from '@/schemas';
-import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter';
-
-const columnHelper =
- createColumnHelper();
-
-export const ACCOUNT_CANCELLED_REVERSIBLE_COLUMNS = [
- columnHelper.accessor('node.scheduledTransfer.tx_id', {
- id: 'tx-id',
- header: 'Tx ID',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.block.height', {
- id: 'blockNumber',
- header: 'Block',
- cell: (props) => (
-
- ),
- enableSorting: true
- }),
- columnHelper.accessor('node.timestamp', {
- id: 'timestamp',
- header: 'Timestamp',
- cell: (props) => ,
- enableSorting: true
- }),
- columnHelper.accessor('node.cancelledBy.id', {
- id: 'cancelledBy',
- header: 'Cancelled By',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.scheduledTransfer.from.id', {
- id: 'from',
- header: 'From',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.scheduledTransfer.to.id', {
- id: 'to',
- header: 'To',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.scheduledTransfer.amount', {
- id: 'amount',
- header: 'Amount',
- cell: (props) => formatMonetaryValue(props.getValue(), 5),
- enableSorting: true
- })
-];
diff --git a/src/components/common/table-columns/ACCOUNT_EXECUTED_REVERSIBLE_COLUMNS.tsx b/src/components/common/table-columns/ACCOUNT_EXECUTED_REVERSIBLE_COLUMNS.tsx
deleted file mode 100644
index 2cca26d..0000000
--- a/src/components/common/table-columns/ACCOUNT_EXECUTED_REVERSIBLE_COLUMNS.tsx
+++ /dev/null
@@ -1,72 +0,0 @@
-import { createColumnHelper } from '@tanstack/react-table';
-
-import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy';
-import { TimestampDisplay } from '@/components/ui/timestamp-display';
-import { RESOURCES } from '@/constants/resources';
-import type { AccountExecutedReversibleTransaction } from '@/schemas';
-import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter';
-
-const columnHelper = createColumnHelper();
-
-export const ACCOUNT_EXECUTED_REVERSIBLE_COLUMNS = [
- columnHelper.accessor('node.scheduledTransfer.tx_id', {
- id: 'tx-id',
- header: 'Tx ID',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.block.height', {
- id: 'blockNumber',
- header: 'Block',
- cell: (props) => (
-
- ),
- enableSorting: true
- }),
- columnHelper.accessor('node.timestamp', {
- id: 'timestamp',
- header: 'Timestamp',
- cell: (props) => ,
- enableSorting: true
- }),
- columnHelper.accessor('node.scheduledTransfer.from.id', {
- id: 'from',
- header: 'From',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.scheduledTransfer.to.id', {
- id: 'to',
- header: 'To',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.scheduledTransfer.amount', {
- id: 'amount',
- header: 'Amount',
- cell: (props) => formatMonetaryValue(props.getValue(), 5),
- enableSorting: true
- })
-];
diff --git a/src/components/common/table-columns/ACCOUNT_GUARDIAN_COLUMNS.tsx b/src/components/common/table-columns/ACCOUNT_GUARDIAN_COLUMNS.tsx
index 4ec5222..e2b5cc6 100644
--- a/src/components/common/table-columns/ACCOUNT_GUARDIAN_COLUMNS.tsx
+++ b/src/components/common/table-columns/ACCOUNT_GUARDIAN_COLUMNS.tsx
@@ -8,7 +8,7 @@ import { formatMonetaryValue } from '@/utils/formatter';
const columnHelper = createColumnHelper();
export const ACCOUNT_GUARDIAN_COLUMNS = [
- columnHelper.accessor('node.interceptor.id', {
+ columnHelper.accessor('interceptor.id', {
id: 'id',
header: 'Identity',
cell: (props) => (
@@ -19,19 +19,19 @@ export const ACCOUNT_GUARDIAN_COLUMNS = [
),
enableSorting: false
}),
- columnHelper.accessor('node.interceptor.free', {
+ columnHelper.accessor('interceptor.free', {
id: 'free',
header: 'Free',
cell: (props) => formatMonetaryValue(props.getValue(), 5),
enableSorting: true
}),
- columnHelper.accessor('node.interceptor.frozen', {
+ columnHelper.accessor('interceptor.frozen', {
id: 'frozen',
header: 'Frozen',
cell: (props) => formatMonetaryValue(props.getValue(), 5),
enableSorting: true
}),
- columnHelper.accessor('node.interceptor.reserved', {
+ columnHelper.accessor('interceptor.reserved', {
id: 'reserved',
header: 'Reserved',
cell: (props) => formatMonetaryValue(props.getValue(), 5),
diff --git a/src/components/common/table-columns/ACCOUNT_MINER_REWARDS_COLUMNS.tsx b/src/components/common/table-columns/ACCOUNT_MINER_REWARDS_COLUMNS.tsx
deleted file mode 100644
index 6bbb7a8..0000000
--- a/src/components/common/table-columns/ACCOUNT_MINER_REWARDS_COLUMNS.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-import { createColumnHelper } from '@tanstack/react-table';
-
-import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy';
-import { TimestampDisplay } from '@/components/ui/timestamp-display';
-import { RESOURCES } from '@/constants/resources';
-import type { AccountMinerRewards } from '@/schemas';
-import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter';
-
-const columnHelper = createColumnHelper();
-
-export const ACCOUNT_MINER_REWARDS_COLUMNS = [
- columnHelper.accessor('node.block.hash', {
- id: 'node_block_hash',
- header: 'Hash',
- cell: (props) => (
-
- ),
- enableSorting: true
- }),
- columnHelper.accessor('node.block.height', {
- id: 'node_block_height',
- header: 'Block',
- cell: (props) => (
-
- ),
- enableSorting: true
- }),
- columnHelper.accessor('node.miner.id', {
- id: 'timestamp',
- header: 'Timestamp',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.reward', {
- id: 'from',
- header: 'From',
- cell: (props) => formatMonetaryValue(props.getValue()),
- enableSorting: true
- }),
- columnHelper.accessor('node.timestamp', {
- id: 'to',
- header: 'To',
- cell: (props) => ,
- enableSorting: true
- })
-];
diff --git a/src/components/common/table-columns/ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS.tsx b/src/components/common/table-columns/ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS.tsx
deleted file mode 100644
index 6e56fa3..0000000
--- a/src/components/common/table-columns/ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS.tsx
+++ /dev/null
@@ -1,79 +0,0 @@
-import { createColumnHelper } from '@tanstack/react-table';
-
-import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy';
-import { TimestampDisplay } from '@/components/ui/timestamp-display';
-import { RESOURCES } from '@/constants/resources';
-import type { AccountScheduledReversibleTransaction } from '@/schemas';
-import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter';
-
-const columnHelper =
- createColumnHelper();
-
-export const ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS = [
- columnHelper.accessor('node.tx_id', {
- id: 'tx-id',
- header: 'Tx ID',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.block.height', {
- id: 'blockNumber',
- header: 'Block',
- cell: (props) => (
-
- ),
- enableSorting: true
- }),
- columnHelper.accessor('node.timestamp', {
- id: 'timestamp',
- header: 'Timestamp',
- cell: (props) => ,
- enableSorting: true
- }),
- columnHelper.accessor('node.scheduled_at', {
- id: 'scheduledAt',
- header: 'Scheduled At',
- cell: (props) => ,
- enableSorting: true
- }),
- columnHelper.accessor('node.from.id', {
- id: 'from',
- header: 'From',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.to.id', {
- id: 'to',
- header: 'To',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.amount', {
- id: 'amount',
- header: 'Amount',
- cell: (props) => formatMonetaryValue(props.getValue(), 5),
- enableSorting: true
- })
-];
diff --git a/src/components/common/table-columns/ACCOUNT_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/ACCOUNT_TRANSACTION_COLUMNS.tsx
deleted file mode 100644
index f8c9be3..0000000
--- a/src/components/common/table-columns/ACCOUNT_TRANSACTION_COLUMNS.tsx
+++ /dev/null
@@ -1,78 +0,0 @@
-import { createColumnHelper } from '@tanstack/react-table';
-
-import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy';
-import { TimestampDisplay } from '@/components/ui/timestamp-display';
-import { RESOURCES } from '@/constants/resources';
-import type { AccountTransaction } from '@/schemas';
-import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter';
-
-const columnHelper = createColumnHelper();
-
-export const ACCOUNT_TRANSACTION_COLUMNS = [
- columnHelper.accessor('node.extrinsic.id', {
- id: 'tx-hash',
- header: 'Hash',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.block.height', {
- id: 'blockNumber',
- header: 'Block',
- cell: (props) => (
-
- ),
- enableSorting: true
- }),
- columnHelper.accessor('node.timestamp', {
- id: 'timestamp',
- header: 'Timestamp',
- cell: (props) => ,
- enableSorting: true
- }),
- columnHelper.accessor('node.from.id', {
- id: 'from',
- header: 'From',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.to.id', {
- id: 'to',
- header: 'To',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.amount', {
- id: 'amount',
- header: 'Amount',
- cell: (props) => formatMonetaryValue(props.getValue(), 5),
- enableSorting: true
- }),
- columnHelper.accessor('node.fee', {
- id: 'fee',
- header: 'Fee',
- cell: (props) => formatMonetaryValue(props.getValue(), 5),
- enableSorting: true
- })
-];
diff --git a/src/components/common/table-columns/BLOCK_CANCELLED_REVERSIBLE_COLUMNS.tsx b/src/components/common/table-columns/BLOCK_CANCELLED_REVERSIBLE_COLUMNS.tsx
deleted file mode 100644
index 1e0bf70..0000000
--- a/src/components/common/table-columns/BLOCK_CANCELLED_REVERSIBLE_COLUMNS.tsx
+++ /dev/null
@@ -1,72 +0,0 @@
-import { createColumnHelper } from '@tanstack/react-table';
-
-import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy';
-import { TimestampDisplay } from '@/components/ui/timestamp-display';
-import { RESOURCES } from '@/constants/resources';
-import type { BlockCancelledReversibleTransaction } from '@/schemas';
-import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter';
-
-const columnHelper = createColumnHelper();
-
-export const BLOCK_CANCELLED_REVERSIBLE_COLUMNS = [
- columnHelper.accessor('node.tx_id', {
- id: 'tx-id',
- header: 'Tx ID',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.timestamp', {
- id: 'timestamp',
- header: 'Timestamp',
- cell: (props) => ,
- enableSorting: true
- }),
- columnHelper.accessor('node.cancelledBy.id', {
- id: 'cancelledBy',
- header: 'Cancelled By',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.scheduledTransfer.from.id', {
- id: 'from',
- header: 'From',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.scheduledTransfer.to.id', {
- id: 'to',
- header: 'To',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.scheduledTransfer.amount', {
- id: 'amount',
- header: 'Amount',
- cell: (props) => formatMonetaryValue(props.getValue(), 5),
- enableSorting: true
- })
-];
diff --git a/src/components/common/table-columns/BLOCK_ERROR_EVENT_COLUMNS.tsx b/src/components/common/table-columns/BLOCK_ERROR_EVENT_COLUMNS.tsx
deleted file mode 100644
index 714978e..0000000
--- a/src/components/common/table-columns/BLOCK_ERROR_EVENT_COLUMNS.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import { createColumnHelper } from '@tanstack/react-table';
-
-import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy';
-import { TimestampDisplay } from '@/components/ui/timestamp-display';
-import { RESOURCES } from '@/constants/resources';
-import type { BlockErrorEvent } from '@/schemas';
-import { formatTxAddress } from '@/utils/formatter';
-
-const columnHelper = createColumnHelper();
-
-export const BLOCK_ERROR_EVENT_COLUMNS = [
- columnHelper.accessor('node.extrinsic.id', {
- id: 'extrinsicHash',
- header: 'Extrinsic Hash',
- cell: (props) =>
- props.getValue() ? (
-
- ) : (
- 'Is not available'
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.block.height', {
- id: 'block_height',
- header: 'Block',
- cell: (props) => (
-
- ),
- enableSorting: true
- }),
- columnHelper.accessor('node.timestamp', {
- id: 'timestamp',
- header: 'Timestamp',
- cell: (props) => ,
- enableSorting: true
- }),
- columnHelper.accessor('node.error_type', {
- id: 'errorType',
- header: 'Type',
- cell: (props) => props.getValue(),
- enableSorting: true
- }),
- columnHelper.accessor('node.error_name', {
- id: 'errorName',
- header: 'Name',
- cell: (props) => props.getValue() ?? '-',
- enableSorting: true
- })
-];
diff --git a/src/components/common/table-columns/BLOCK_EXECUTED_REVERSIBLE_COLUMNS.tsx b/src/components/common/table-columns/BLOCK_EXECUTED_REVERSIBLE_COLUMNS.tsx
deleted file mode 100644
index 74be939..0000000
--- a/src/components/common/table-columns/BLOCK_EXECUTED_REVERSIBLE_COLUMNS.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-import { createColumnHelper } from '@tanstack/react-table';
-
-import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy';
-import { TimestampDisplay } from '@/components/ui/timestamp-display';
-import { RESOURCES } from '@/constants/resources';
-import type { BlockExecutedReversibleTransaction } from '@/schemas';
-import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter';
-
-const columnHelper = createColumnHelper();
-
-export const BLOCK_EXECUTED_REVERSIBLE_COLUMNS = [
- columnHelper.accessor('node.tx_id', {
- id: 'tx-id',
- header: 'Tx ID',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.timestamp', {
- id: 'timestamp',
- header: 'Timestamp',
- cell: (props) => ,
- enableSorting: true
- }),
- columnHelper.accessor('node.scheduledTransfer.from.id', {
- id: 'from',
- header: 'From',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.scheduledTransfer.to.id', {
- id: 'to',
- header: 'To',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.scheduledTransfer.amount', {
- id: 'amount',
- header: 'Amount',
- cell: (props) => formatMonetaryValue(props.getValue(), 5),
- enableSorting: true
- })
-];
diff --git a/src/components/common/table-columns/BLOCK_HIGH_SECURITY_SET_COLUMNS.tsx b/src/components/common/table-columns/BLOCK_HIGH_SECURITY_SET_COLUMNS.tsx
deleted file mode 100644
index cda8242..0000000
--- a/src/components/common/table-columns/BLOCK_HIGH_SECURITY_SET_COLUMNS.tsx
+++ /dev/null
@@ -1,74 +0,0 @@
-import { createColumnHelper } from '@tanstack/react-table';
-
-import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy';
-import { TimestampDisplay } from '@/components/ui/timestamp-display';
-import { RESOURCES } from '@/constants/resources';
-import type { BlockHighSecuritySet } from '@/schemas';
-import { formatDuration, formatTxAddress } from '@/utils/formatter';
-
-const columnHelper = createColumnHelper();
-
-export const BLOCK_HIGH_SECURITY_SET_COLUMNS = [
- columnHelper.accessor('node.extrinsic.id', {
- id: 'tx-hash',
- header: 'Hash',
- cell: (props) =>
- props.getValue() ? (
-
- ) : (
- 'Is not available'
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.block.height', {
- id: 'block_height',
- header: 'Block',
- cell: (props) => (
-
- ),
- enableSorting: true
- }),
- columnHelper.accessor('node.timestamp', {
- id: 'timestamp',
- header: 'Timestamp',
- cell: (props) => ,
- enableSorting: true
- }),
- columnHelper.accessor('node.who.id', {
- id: 'who',
- header: 'Beneficiary',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.interceptor.id', {
- id: 'interceptor',
- header: 'Guardian',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.delay', {
- id: 'delay',
- header: 'Reversible Time',
- cell: (props) => formatDuration(props.getValue()),
- enableSorting: true
- })
-];
diff --git a/src/components/common/table-columns/BLOCK_SCHEDULED_REVERSIBLE_COLUMNS.tsx b/src/components/common/table-columns/BLOCK_SCHEDULED_REVERSIBLE_COLUMNS.tsx
deleted file mode 100644
index b4a1bfb..0000000
--- a/src/components/common/table-columns/BLOCK_SCHEDULED_REVERSIBLE_COLUMNS.tsx
+++ /dev/null
@@ -1,66 +0,0 @@
-import { createColumnHelper } from '@tanstack/react-table';
-
-import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy';
-import { TimestampDisplay } from '@/components/ui/timestamp-display';
-import { RESOURCES } from '@/constants/resources';
-import type { BlockScheduledReversibleTransaction } from '@/schemas';
-import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter';
-
-const columnHelper = createColumnHelper();
-
-export const BLOCK_SCHEDULED_REVERSIBLE_COLUMNS = [
- columnHelper.accessor('node.tx_id', {
- id: 'tx-id',
- header: 'Tx ID',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.timestamp', {
- id: 'timestamp',
- header: 'Timestamp',
- cell: (props) => ,
- enableSorting: true
- }),
- columnHelper.accessor('node.scheduled_at', {
- id: 'scheduledAt',
- header: 'Scheduled At',
- cell: (props) => ,
- enableSorting: true
- }),
- columnHelper.accessor('node.from.id', {
- id: 'from',
- header: 'From',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.to.id', {
- id: 'to',
- header: 'To',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.amount', {
- id: 'amount',
- header: 'Amount',
- cell: (props) => formatMonetaryValue(props.getValue(), 5),
- enableSorting: true
- })
-];
diff --git a/src/components/common/table-columns/BLOCK_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/BLOCK_TRANSACTION_COLUMNS.tsx
deleted file mode 100644
index c577f99..0000000
--- a/src/components/common/table-columns/BLOCK_TRANSACTION_COLUMNS.tsx
+++ /dev/null
@@ -1,78 +0,0 @@
-import { createColumnHelper } from '@tanstack/react-table';
-
-import { LinkWithCopy } from '@/components/ui/composites/link-with-copy/LinkWithCopy';
-import { TimestampDisplay } from '@/components/ui/timestamp-display';
-import { RESOURCES } from '@/constants/resources';
-import type { BlockTransaction } from '@/schemas';
-import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter';
-
-const columnHelper = createColumnHelper();
-
-export const BLOCK_TRANSACTION_COLUMNS = [
- columnHelper.accessor('node.extrinsic.id', {
- id: 'tx-hash',
- header: 'Hash',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.block.height', {
- id: 'blockNumber',
- header: 'Block',
- cell: (props) => (
-
- ),
- enableSorting: true
- }),
- columnHelper.accessor('node.timestamp', {
- id: 'timestamp',
- header: 'Timestamp',
- cell: (props) => ,
- enableSorting: true
- }),
- columnHelper.accessor('node.from.id', {
- id: 'from',
- header: 'From',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.to.id', {
- id: 'to',
- header: 'To',
- cell: (props) => (
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('node.amount', {
- id: 'amount',
- header: 'Amount',
- cell: (props) => formatMonetaryValue(props.getValue(), 5),
- enableSorting: true
- }),
- columnHelper.accessor('node.fee', {
- id: 'fee',
- header: 'Fee',
- cell: (props) => formatMonetaryValue(props.getValue(), 5),
- enableSorting: true
- })
-];
diff --git a/src/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS.tsx
index 01fe0e1..e5aec08 100644
--- a/src/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS.tsx
+++ b/src/components/common/table-columns/CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS.tsx
@@ -9,7 +9,7 @@ import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter';
const columnHelper = createColumnHelper();
export const CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS = [
- columnHelper.accessor('node.tx_id', {
+ columnHelper.accessor('tx_id', {
id: 'tx-id',
header: 'Tx ID',
cell: (props) => (
@@ -21,7 +21,7 @@ export const CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS = [
),
enableSorting: false
}),
- columnHelper.accessor('node.block.height', {
+ columnHelper.accessor('block.height', {
id: 'block_height',
header: 'Block',
cell: (props) => (
@@ -32,13 +32,13 @@ export const CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS = [
),
enableSorting: true
}),
- columnHelper.accessor('node.timestamp', {
+ columnHelper.accessor('timestamp', {
id: 'timestamp',
header: 'Timestamp',
cell: (props) => ,
enableSorting: true
}),
- columnHelper.accessor('node.cancelledBy.id', {
+ columnHelper.accessor('cancelledBy.id', {
id: 'cancelledBy',
header: 'Cancelled By',
cell: (props) => (
@@ -50,7 +50,7 @@ export const CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS = [
),
enableSorting: false
}),
- columnHelper.accessor('node.scheduledTransfer.from.id', {
+ columnHelper.accessor('scheduledTransfer.from.id', {
id: 'from',
header: 'From',
cell: (props) => (
@@ -62,7 +62,7 @@ export const CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS = [
),
enableSorting: false
}),
- columnHelper.accessor('node.scheduledTransfer.to.id', {
+ columnHelper.accessor('scheduledTransfer.to.id', {
id: 'to',
header: 'To',
cell: (props) => (
@@ -74,7 +74,7 @@ export const CANCELLED_REVERSIBLE_TRANSACTION_COLUMNS = [
),
enableSorting: false
}),
- columnHelper.accessor('node.scheduledTransfer.amount', {
+ columnHelper.accessor('scheduledTransfer.amount', {
id: 'amount',
header: 'Amount',
cell: (props) => formatMonetaryValue(props.getValue(), 5),
diff --git a/src/components/common/table-columns/ERROR_EVENT_COLUMNS.tsx b/src/components/common/table-columns/ERROR_EVENT_COLUMNS.tsx
index 50b9a56..3b7ec42 100644
--- a/src/components/common/table-columns/ERROR_EVENT_COLUMNS.tsx
+++ b/src/components/common/table-columns/ERROR_EVENT_COLUMNS.tsx
@@ -9,7 +9,7 @@ import { formatTxAddress } from '@/utils/formatter';
const columnHelper = createColumnHelper();
export const ERROR_EVENT_COLUMNS = [
- columnHelper.accessor('node.extrinsic.id', {
+ columnHelper.accessor('extrinsic.id', {
id: 'extrinsicHash',
header: 'Extrinsic Hash',
cell: (props) =>
@@ -24,7 +24,7 @@ export const ERROR_EVENT_COLUMNS = [
),
enableSorting: false
}),
- columnHelper.accessor('node.block.height', {
+ columnHelper.accessor('block.height', {
id: 'block_height',
header: 'Block',
cell: (props) => (
@@ -35,19 +35,19 @@ export const ERROR_EVENT_COLUMNS = [
),
enableSorting: true
}),
- columnHelper.accessor('node.timestamp', {
+ columnHelper.accessor('timestamp', {
id: 'timestamp',
header: 'Timestamp',
cell: (props) => ,
enableSorting: true
}),
- columnHelper.accessor('node.error_type', {
+ columnHelper.accessor('error_type', {
id: 'errorType',
header: 'Type',
cell: (props) => props.getValue(),
enableSorting: true
}),
- columnHelper.accessor('node.error_name', {
+ columnHelper.accessor('error_name', {
id: 'errorName',
header: 'Name',
cell: (props) => props.getValue() ?? '-',
diff --git a/src/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS.tsx
index 53d3f23..697a4a2 100644
--- a/src/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS.tsx
+++ b/src/components/common/table-columns/EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS.tsx
@@ -9,7 +9,7 @@ import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter';
const columnHelper = createColumnHelper();
export const EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS = [
- columnHelper.accessor('node.tx_id', {
+ columnHelper.accessor('tx_id', {
id: 'tx-id',
header: 'Tx ID',
cell: (props) => (
@@ -21,7 +21,7 @@ export const EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS = [
),
enableSorting: false
}),
- columnHelper.accessor('node.block.height', {
+ columnHelper.accessor('block.height', {
id: 'block_height',
header: 'Block',
cell: (props) => (
@@ -32,13 +32,13 @@ export const EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS = [
),
enableSorting: true
}),
- columnHelper.accessor('node.timestamp', {
+ columnHelper.accessor('timestamp', {
id: 'timestamp',
header: 'Timestamp',
cell: (props) => ,
enableSorting: true
}),
- columnHelper.accessor('node.scheduledTransfer.from.id', {
+ columnHelper.accessor('scheduledTransfer.from.id', {
id: 'from',
header: 'From',
cell: (props) => (
@@ -50,7 +50,7 @@ export const EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS = [
),
enableSorting: false
}),
- columnHelper.accessor('node.scheduledTransfer.to.id', {
+ columnHelper.accessor('scheduledTransfer.to.id', {
id: 'to',
header: 'To',
cell: (props) => (
@@ -62,7 +62,7 @@ export const EXECUTED_REVERSIBLE_TRANSACTION_COLUMNS = [
),
enableSorting: false
}),
- columnHelper.accessor('node.scheduledTransfer.amount', {
+ columnHelper.accessor('scheduledTransfer.amount', {
id: 'amount',
header: 'Amount',
cell: (props) => formatMonetaryValue(props.getValue(), 5),
diff --git a/src/components/common/table-columns/HIGH_SECURITY_SET_COLUMNS.tsx b/src/components/common/table-columns/HIGH_SECURITY_SET_COLUMNS.tsx
index bf1134f..ec09641 100644
--- a/src/components/common/table-columns/HIGH_SECURITY_SET_COLUMNS.tsx
+++ b/src/components/common/table-columns/HIGH_SECURITY_SET_COLUMNS.tsx
@@ -9,7 +9,7 @@ import { formatDuration, formatTxAddress } from '@/utils/formatter';
const columnHelper = createColumnHelper();
export const HIGH_SECURITY_SET_COLUMNS = [
- columnHelper.accessor('node.extrinsic.id', {
+ columnHelper.accessor('extrinsic.id', {
id: 'tx-hash',
header: 'Hash',
cell: (props) =>
@@ -24,7 +24,7 @@ export const HIGH_SECURITY_SET_COLUMNS = [
),
enableSorting: false
}),
- columnHelper.accessor('node.block.height', {
+ columnHelper.accessor('block.height', {
id: 'block_height',
header: 'Block',
cell: (props) => (
@@ -35,13 +35,13 @@ export const HIGH_SECURITY_SET_COLUMNS = [
),
enableSorting: true
}),
- columnHelper.accessor('node.timestamp', {
+ columnHelper.accessor('timestamp', {
id: 'timestamp',
header: 'Timestamp',
cell: (props) => ,
enableSorting: true
}),
- columnHelper.accessor('node.who.id', {
+ columnHelper.accessor('who.id', {
id: 'who',
header: 'Beneficiary',
cell: (props) => (
@@ -53,7 +53,7 @@ export const HIGH_SECURITY_SET_COLUMNS = [
),
enableSorting: false
}),
- columnHelper.accessor('node.interceptor.id', {
+ columnHelper.accessor('interceptor.id', {
id: 'interceptor',
header: 'Guardian',
cell: (props) => (
@@ -65,7 +65,7 @@ export const HIGH_SECURITY_SET_COLUMNS = [
),
enableSorting: false
}),
- columnHelper.accessor('node.delay', {
+ columnHelper.accessor('delay', {
id: 'delay',
header: 'Reversible Time',
cell: (props) => formatDuration(props.getValue()),
diff --git a/src/components/common/table-columns/MINER_REWARD_COLUMNS.tsx b/src/components/common/table-columns/MINER_REWARD_COLUMNS.tsx
index ad01a4b..b48fc21 100644
--- a/src/components/common/table-columns/MINER_REWARD_COLUMNS.tsx
+++ b/src/components/common/table-columns/MINER_REWARD_COLUMNS.tsx
@@ -9,7 +9,7 @@ import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter';
const columnHelper = createColumnHelper();
export const MINER_REWARD_COLUMNS = [
- columnHelper.accessor('node.block.hash', {
+ columnHelper.accessor('block.hash', {
id: 'block_hash',
header: 'Hash',
cell: (props) => (
@@ -20,7 +20,7 @@ export const MINER_REWARD_COLUMNS = [
),
enableSorting: true
}),
- columnHelper.accessor('node.block.height', {
+ columnHelper.accessor('block.height', {
id: 'block_height',
header: 'Block',
cell: (props) => (
@@ -31,7 +31,7 @@ export const MINER_REWARD_COLUMNS = [
),
enableSorting: true
}),
- columnHelper.accessor('node.miner.id', {
+ columnHelper.accessor('miner.id', {
id: 'miner',
header: 'Mined by',
cell: (props) => (
@@ -42,13 +42,13 @@ export const MINER_REWARD_COLUMNS = [
),
enableSorting: false
}),
- columnHelper.accessor('node.reward', {
+ columnHelper.accessor('reward', {
id: 'reward',
header: 'Reward',
cell: (props) => formatMonetaryValue(props.getValue()),
enableSorting: true
}),
- columnHelper.accessor('node.timestamp', {
+ columnHelper.accessor('timestamp', {
id: 'timestamp',
header: 'Timestamp',
cell: (props) => ,
diff --git a/src/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.tsx
index 073bcac..54c06c1 100644
--- a/src/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.tsx
+++ b/src/components/common/table-columns/SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS.tsx
@@ -9,7 +9,7 @@ import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter';
const columnHelper = createColumnHelper();
export const SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS = [
- columnHelper.accessor('node.tx_id', {
+ columnHelper.accessor('tx_id', {
id: 'tx-id',
header: 'Tx ID',
cell: (props) => (
@@ -21,7 +21,7 @@ export const SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS = [
),
enableSorting: false
}),
- columnHelper.accessor('node.block.height', {
+ columnHelper.accessor('block.height', {
id: 'block_height',
header: 'Block',
cell: (props) => (
@@ -32,19 +32,19 @@ export const SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS = [
),
enableSorting: true
}),
- columnHelper.accessor('node.timestamp', {
+ columnHelper.accessor('timestamp', {
id: 'timestamp',
header: 'Timestamp',
cell: (props) => ,
enableSorting: true
}),
- columnHelper.accessor('node.scheduled_at', {
+ columnHelper.accessor('scheduled_at', {
id: 'scheduled_at',
header: 'Scheduled At',
cell: (props) => ,
enableSorting: true
}),
- columnHelper.accessor('node.from.id', {
+ columnHelper.accessor('from.id', {
id: 'from',
header: 'From',
cell: (props) => (
@@ -56,7 +56,7 @@ export const SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS = [
),
enableSorting: false
}),
- columnHelper.accessor('node.to.id', {
+ columnHelper.accessor('to.id', {
id: 'to',
header: 'To',
cell: (props) => (
@@ -68,7 +68,7 @@ export const SCHEDULED_REVERSIBLE_TRANSACTION_COLUMNS = [
),
enableSorting: false
}),
- columnHelper.accessor('node.amount', {
+ columnHelper.accessor('amount', {
id: 'amount',
header: 'Amount',
cell: (props) => formatMonetaryValue(props.getValue(), 5),
diff --git a/src/components/common/table-columns/TRANSACTION_COLUMNS.tsx b/src/components/common/table-columns/TRANSACTION_COLUMNS.tsx
index e0feb45..a056847 100644
--- a/src/components/common/table-columns/TRANSACTION_COLUMNS.tsx
+++ b/src/components/common/table-columns/TRANSACTION_COLUMNS.tsx
@@ -9,7 +9,7 @@ import { formatMonetaryValue, formatTxAddress } from '@/utils/formatter';
const columnHelper = createColumnHelper();
export const TRANSACTION_COLUMNS = [
- columnHelper.accessor('node.extrinsic.id', {
+ columnHelper.accessor('extrinsic.id', {
id: 'tx-hash',
header: 'Hash',
cell: (props) =>
@@ -24,7 +24,7 @@ export const TRANSACTION_COLUMNS = [
),
enableSorting: false
}),
- columnHelper.accessor('node.block.height', {
+ columnHelper.accessor('block.height', {
id: 'block_height',
header: 'Block',
cell: (props) => (
@@ -35,13 +35,13 @@ export const TRANSACTION_COLUMNS = [
),
enableSorting: true
}),
- columnHelper.accessor('node.timestamp', {
+ columnHelper.accessor('timestamp', {
id: 'timestamp',
header: 'Timestamp',
cell: (props) => ,
enableSorting: true
}),
- columnHelper.accessor('node.from.id', {
+ columnHelper.accessor('from.id', {
id: 'from',
header: 'From',
cell: (props) => (
@@ -53,7 +53,7 @@ export const TRANSACTION_COLUMNS = [
),
enableSorting: false
}),
- columnHelper.accessor('node.to.id', {
+ columnHelper.accessor('to.id', {
id: 'to',
header: 'To',
cell: (props) => (
@@ -65,13 +65,13 @@ export const TRANSACTION_COLUMNS = [
),
enableSorting: false
}),
- columnHelper.accessor('node.amount', {
+ columnHelper.accessor('amount', {
id: 'amount',
header: 'Amount',
cell: (props) => formatMonetaryValue(props.getValue(), 5),
enableSorting: true
}),
- columnHelper.accessor('node.fee', {
+ columnHelper.accessor('fee', {
id: 'fee',
header: 'Fee',
cell: (props) => formatMonetaryValue(props.getValue(), 5),
diff --git a/src/components/features/account-details/account-all-transactions/hook.tsx b/src/components/features/account-details/account-all-transactions/hook.tsx
index 69f3a3f..b02ce76 100644
--- a/src/components/features/account-details/account-all-transactions/hook.tsx
+++ b/src/components/features/account-details/account-all-transactions/hook.tsx
@@ -18,11 +18,7 @@ import {
transformScheduledTransaction,
transformWormholeOutput
} from '@/hooks/useUnifiedTransactions';
-import type {
- AccountResponse,
- HighSecuritySet,
- UnifiedTransaction
-} from '@/schemas';
+import type { AccountResponse, UnifiedTransaction } from '@/schemas';
// Account page shows block column
const columns = createUnifiedTransactionColumns({ showBlockColumn: true });
@@ -73,15 +69,13 @@ export const useAccountAllTransactions = (
unified.push(
transformHighSecuritySet(
{
- node: {
- timestamp: (guardian as any).timestamp ?? '',
- block: (guardian as any).block ?? {
- height: 0
- },
- who: { id: '' }, // Guardian view doesn't have who (it's the current account)
- interceptor: guardian.node.interceptor
- }
- } as HighSecuritySet,
+ timestamp: (guardian as { timestamp?: string }).timestamp ?? '',
+ block: (guardian as { block?: { height: number } }).block ?? {
+ height: 0
+ },
+ who: { id: '' }, // Guardian view doesn't have who (it's the current account)
+ interceptor: guardian.interceptor
+ },
idx
)
);
@@ -92,15 +86,13 @@ export const useAccountAllTransactions = (
unified.push(
transformHighSecuritySet(
{
- node: {
- timestamp: (beneficiary as any).timestamp ?? '',
- block: (beneficiary as any).block ?? {
- height: 0
- },
- who: beneficiary.node.who,
- interceptor: { id: '' } // Beneficiary view doesn't have interceptor (it's the current account)
- }
- } as HighSecuritySet,
+ timestamp: (beneficiary as { timestamp?: string }).timestamp ?? '',
+ block: (beneficiary as { block?: { height: number } }).block ?? {
+ height: 0
+ },
+ who: beneficiary.who,
+ interceptor: { id: '' } // Beneficiary view doesn't have interceptor (it's the current account)
+ },
idx
)
);
diff --git a/src/components/features/account-details/account-cancelled-reversible-transactions/AccountCancelledReversibleTransactions.tsx b/src/components/features/account-details/account-cancelled-reversible-transactions/AccountCancelledReversibleTransactions.tsx
deleted file mode 100644
index afe8d01..0000000
--- a/src/components/features/account-details/account-cancelled-reversible-transactions/AccountCancelledReversibleTransactions.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-import type { QueryResult } from '@apollo/client';
-import { Link } from '@tanstack/react-router';
-import type { FC } from 'react';
-
-import { Button } from '@/components/ui/button';
-import { DataTable } from '@/components/ui/composites/data-table/DataTable';
-import { ContentContainer } from '@/components/ui/content-container';
-import { RESOURCES } from '@/constants/resources';
-import type { AccountResponse } from '@/schemas';
-
-import { useAccountCancelledReversibleTransactions } from './hook';
-
-interface Props {
- query: QueryResult;
- accountId: string;
-}
-
-export const AccountCancelledReversibleTransactions: FC = ({
- query,
- accountId
-}) => {
- const { getStatus, table, error } =
- useAccountCancelledReversibleTransactions(query);
-
- return (
-
- Recent Cancelled Reversible Transactions
-
- Error : {error && error.message}
- }}
- />
-
- {!query.loading &&
- query.data?.cancelledReversibleTransactions.aggregate.totalCount !==
- 0 && (
-
- )}
-
- );
-};
diff --git a/src/components/features/account-details/account-cancelled-reversible-transactions/hook.tsx b/src/components/features/account-details/account-cancelled-reversible-transactions/hook.tsx
deleted file mode 100644
index ca84323..0000000
--- a/src/components/features/account-details/account-cancelled-reversible-transactions/hook.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-import type { QueryResult } from '@apollo/client';
-import { getCoreRowModel, useReactTable } from '@tanstack/react-table';
-import { useCallback, useMemo } from 'react';
-
-import { ACCOUNT_CANCELLED_REVERSIBLE_COLUMNS } from '@/components/common/table-columns/ACCOUNT_CANCELLED_REVERSIBLE_COLUMNS';
-import type {
- AccountCancelledReversibleTransaction,
- AccountResponse
-} from '@/schemas';
-
-export const useAccountCancelledReversibleTransactions = (
- query: QueryResult
-) => {
- const { data, error: fetchError, loading } = query;
- const columns = useMemo(() => ACCOUNT_CANCELLED_REVERSIBLE_COLUMNS, []);
-
- const tableData = useMemo(
- () => data?.cancelledReversibleTransactions?.nodes ?? [],
- [data?.cancelledReversibleTransactions?.nodes]
- );
-
- const table = useReactTable({
- data: tableData,
- columns: columns as any,
- getCoreRowModel: getCoreRowModel(),
- enableSorting: false
- });
-
- const success = !loading && !fetchError;
- const error = !loading && fetchError;
-
- const getStatus = useCallback(() => {
- switch (true) {
- case success:
- return 'success';
- case !!error:
- return 'error';
- case !!loading:
- return 'loading';
- default:
- return 'idle';
- }
- }, [success, error, loading]);
-
- return {
- table,
- getStatus,
- error
- };
-};
diff --git a/src/components/features/account-details/account-executed-reversible-transactions/AccountExecutedReversibleTransactions.tsx b/src/components/features/account-details/account-executed-reversible-transactions/AccountExecutedReversibleTransactions.tsx
deleted file mode 100644
index e2ece5e..0000000
--- a/src/components/features/account-details/account-executed-reversible-transactions/AccountExecutedReversibleTransactions.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-import type { QueryResult } from '@apollo/client';
-import { Link } from '@tanstack/react-router';
-import type { FC } from 'react';
-
-import { Button } from '@/components/ui/button';
-import { DataTable } from '@/components/ui/composites/data-table/DataTable';
-import { ContentContainer } from '@/components/ui/content-container';
-import { RESOURCES } from '@/constants/resources';
-import type { AccountResponse } from '@/schemas';
-
-import { useAccountExecutedReversibleTransactions } from './hook';
-
-interface Props {
- query: QueryResult;
- accountId: string;
-}
-
-export const AccountExecutedReversibleTransactions: FC = ({
- query,
- accountId
-}) => {
- const { getStatus, table, error } =
- useAccountExecutedReversibleTransactions(query);
-
- return (
-
- Recent Executed Reversible Transactions
-
- Error : {error && error.message}
- }}
- />
-
- {!query.loading &&
- query.data?.executedReversibleTransactions.aggregate.totalCount !==
- 0 && (
-
- )}
-
- );
-};
diff --git a/src/components/features/account-details/account-executed-reversible-transactions/hook.tsx b/src/components/features/account-details/account-executed-reversible-transactions/hook.tsx
deleted file mode 100644
index d5c74ef..0000000
--- a/src/components/features/account-details/account-executed-reversible-transactions/hook.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-import type { QueryResult } from '@apollo/client';
-import { getCoreRowModel, useReactTable } from '@tanstack/react-table';
-import { useCallback, useMemo } from 'react';
-
-import { ACCOUNT_EXECUTED_REVERSIBLE_COLUMNS } from '@/components/common/table-columns/ACCOUNT_EXECUTED_REVERSIBLE_COLUMNS';
-import type {
- AccountExecutedReversibleTransaction,
- AccountResponse
-} from '@/schemas';
-
-export const useAccountExecutedReversibleTransactions = (
- query: QueryResult
-) => {
- const { data, error: fetchError, loading } = query;
- const columns = useMemo(() => ACCOUNT_EXECUTED_REVERSIBLE_COLUMNS, []);
-
- const tableData = useMemo(
- () => data?.executedReversibleTransactions?.nodes ?? [],
- [data?.executedReversibleTransactions?.nodes]
- );
-
- const table = useReactTable({
- data: tableData,
- columns: columns as any,
- getCoreRowModel: getCoreRowModel(),
- enableSorting: false
- });
-
- const success = !loading && !fetchError;
- const error = !loading && fetchError;
-
- const getStatus = useCallback(() => {
- switch (true) {
- case success:
- return 'success';
- case !!error:
- return 'error';
- case !!loading:
- return 'loading';
- default:
- return 'idle';
- }
- }, [success, error, loading]);
-
- return {
- table,
- getStatus,
- error
- };
-};
diff --git a/src/components/features/account-details/account-miner-rewards/AccountMinerRewards.tsx b/src/components/features/account-details/account-miner-rewards/AccountMinerRewards.tsx
deleted file mode 100644
index 466655b..0000000
--- a/src/components/features/account-details/account-miner-rewards/AccountMinerRewards.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-import type { QueryResult } from '@apollo/client';
-import { Link } from '@tanstack/react-router';
-import React from 'react';
-
-import { Button } from '@/components/ui/button';
-import { DataTable } from '@/components/ui/composites/data-table/DataTable';
-import { ContentContainer } from '@/components/ui/content-container';
-import type { AccountResponse } from '@/schemas';
-
-import { useAccountMinerRewards } from './hook';
-
-interface Props {
- query: QueryResult;
- accountId: string;
-}
-
-export const AccountMinerRewards: React.FC = ({ query, accountId }) => {
- const { getStatus, table, error } = useAccountMinerRewards(query);
-
- return (
-
- Recent Miner Rewards
-
- Error: {error && error.message}
- }}
- />
-
- {!query.loading &&
- query.data?.minerRewards.aggregate.totalCount !== 0 && (
-
- )}
-
- );
-};
diff --git a/src/components/features/account-details/account-miner-rewards/hook.tsx b/src/components/features/account-details/account-miner-rewards/hook.tsx
deleted file mode 100644
index 33a803d..0000000
--- a/src/components/features/account-details/account-miner-rewards/hook.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-import type { QueryResult } from '@apollo/client';
-import { getCoreRowModel, useReactTable } from '@tanstack/react-table';
-import { useCallback, useMemo } from 'react';
-
-import { ACCOUNT_MINER_REWARDS_COLUMNS } from '@/components/common/table-columns/ACCOUNT_MINER_REWARDS_COLUMNS';
-import type { AccountMinerRewards, AccountResponse } from '@/schemas';
-
-export const useAccountMinerRewards = (query: QueryResult) => {
- const { data, error: fetchError, loading } = query;
- const minerRewardColumns = useMemo(() => ACCOUNT_MINER_REWARDS_COLUMNS, []);
-
- const tableData = useMemo(
- () => data?.minerRewards?.nodes ?? [],
- [data?.minerRewards?.nodes]
- );
-
- const table = useReactTable({
- data: tableData,
- columns: minerRewardColumns,
- getCoreRowModel: getCoreRowModel(),
- enableSorting: false
- });
-
- const success = !loading && !fetchError;
- const error = !loading && fetchError;
-
- const getStatus = useCallback(() => {
- switch (true) {
- case success:
- return 'success';
- case !!error:
- return 'error';
- case !!loading:
- return 'loading';
- default:
- return 'idle';
- }
- }, [success, error, loading]);
-
- return {
- table,
- getStatus,
- error
- };
-};
diff --git a/src/components/features/account-details/account-scheduled-reversible-transactions/AccountScheduledReversibleTransactions.tsx b/src/components/features/account-details/account-scheduled-reversible-transactions/AccountScheduledReversibleTransactions.tsx
deleted file mode 100644
index bf1bdbe..0000000
--- a/src/components/features/account-details/account-scheduled-reversible-transactions/AccountScheduledReversibleTransactions.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-import type { QueryResult } from '@apollo/client';
-import { Link } from '@tanstack/react-router';
-import type { FC } from 'react';
-
-import { Button } from '@/components/ui/button';
-import { DataTable } from '@/components/ui/composites/data-table/DataTable';
-import { ContentContainer } from '@/components/ui/content-container';
-import { RESOURCES } from '@/constants/resources';
-import type { AccountResponse } from '@/schemas';
-
-import { useAccountScheduledReversibleTransactions } from './hook';
-
-interface Props {
- query: QueryResult;
- accountId: string;
-}
-
-export const AccountScheduledReversibleTransactions: FC = ({
- query,
- accountId
-}) => {
- const { getStatus, table, error } =
- useAccountScheduledReversibleTransactions(query);
-
- return (
-
- Recent Scheduled Reversible Transactions
-
- Error : {error && error.message}
- }}
- />
-
- {!query.loading &&
- query.data?.scheduledReversibleTransactions.aggregate.totalCount !==
- 0 && (
-
- )}
-
- );
-};
diff --git a/src/components/features/account-details/account-scheduled-reversible-transactions/hook.tsx b/src/components/features/account-details/account-scheduled-reversible-transactions/hook.tsx
deleted file mode 100644
index db3a9db..0000000
--- a/src/components/features/account-details/account-scheduled-reversible-transactions/hook.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-import type { QueryResult } from '@apollo/client';
-import { getCoreRowModel, useReactTable } from '@tanstack/react-table';
-import { useCallback, useMemo } from 'react';
-
-import { ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS } from '@/components/common/table-columns/ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS';
-import type {
- AccountResponse,
- AccountScheduledReversibleTransaction
-} from '@/schemas';
-
-export const useAccountScheduledReversibleTransactions = (
- query: QueryResult
-) => {
- const { data, error: fetchError, loading } = query;
- const columns = useMemo(() => ACCOUNT_SCHEDULED_REVERSIBLE_COLUMNS, []);
-
- const tableData = useMemo(
- () => data?.scheduledReversibleTransactions?.nodes ?? [],
- [data?.scheduledReversibleTransactions?.nodes]
- );
-
- const table = useReactTable({
- data: tableData,
- columns: columns as any,
- getCoreRowModel: getCoreRowModel(),
- enableSorting: false
- });
-
- const success = !loading && !fetchError;
- const error = !loading && fetchError;
-
- const getStatus = useCallback(() => {
- switch (true) {
- case success:
- return 'success';
- case !!error:
- return 'error';
- case !!loading:
- return 'loading';
- default:
- return 'idle';
- }
- }, [success, error, loading]);
-
- return {
- table,
- getStatus,
- error
- };
-};
diff --git a/src/components/features/account-details/account-transactions/AccountTransactions.tsx b/src/components/features/account-details/account-transactions/AccountTransactions.tsx
deleted file mode 100644
index 39cc3fe..0000000
--- a/src/components/features/account-details/account-transactions/AccountTransactions.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-import type { QueryResult } from '@apollo/client';
-import { Link } from '@tanstack/react-router';
-import React from 'react';
-
-import { Button } from '@/components/ui/button';
-import { DataTable } from '@/components/ui/composites/data-table/DataTable';
-import { ContentContainer } from '@/components/ui/content-container';
-import type { AccountResponse } from '@/schemas';
-
-import { useAccountTransactions } from './hook';
-
-interface Props {
- query: QueryResult;
- accountId: string;
-}
-
-export const AccountTransactions: React.FC = ({ query, accountId }) => {
- const { getStatus, table, error } = useAccountTransactions(query);
-
- return (
-
- Recent Immediate Transactions
-
- Error: {error && error.message}
- }}
- />
-
- {!query.loading &&
- query.data?.transactions.aggregate.totalCount !== 0 && (
-
- )}
-
- );
-};
diff --git a/src/components/features/account-details/account-transactions/hook.tsx b/src/components/features/account-details/account-transactions/hook.tsx
deleted file mode 100644
index 6f1de7a..0000000
--- a/src/components/features/account-details/account-transactions/hook.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-import type { QueryResult } from '@apollo/client';
-import { getCoreRowModel, useReactTable } from '@tanstack/react-table';
-import { useCallback, useMemo } from 'react';
-
-import { ACCOUNT_TRANSACTION_COLUMNS } from '@/components/common/table-columns/ACCOUNT_TRANSACTION_COLUMNS';
-import type { AccountResponse, AccountTransaction } from '@/schemas';
-
-export const useAccountTransactions = (query: QueryResult) => {
- const { data, error: fetchError, loading } = query;
- const transactionColumns = useMemo(() => ACCOUNT_TRANSACTION_COLUMNS, []);
-
- const tableData = useMemo(
- () => data?.transactions?.nodes ?? [],
- [data?.transactions?.nodes]
- );
-
- const table = useReactTable({
- data: tableData,
- columns: transactionColumns,
- getCoreRowModel: getCoreRowModel(),
- enableSorting: false
- });
-
- const success = !loading && !fetchError;
- const error = !loading && fetchError;
-
- const getStatus = useCallback(() => {
- switch (true) {
- case success:
- return 'success';
- case !!error:
- return 'error';
- case !!loading:
- return 'loading';
- default:
- return 'idle';
- }
- }, [success, error, loading]);
-
- return {
- table,
- getStatus,
- error
- };
-};
diff --git a/src/components/features/block-details/block-cancelled-reversible-transactions/BlockCancelledReversibleTransactions.tsx b/src/components/features/block-details/block-cancelled-reversible-transactions/BlockCancelledReversibleTransactions.tsx
deleted file mode 100644
index 0e05b26..0000000
--- a/src/components/features/block-details/block-cancelled-reversible-transactions/BlockCancelledReversibleTransactions.tsx
+++ /dev/null
@@ -1,49 +0,0 @@
-import type { QueryResult } from '@apollo/client';
-import { Link } from '@tanstack/react-router';
-import React from 'react';
-
-import { Button } from '@/components/ui/button';
-import { DataTable } from '@/components/ui/composites/data-table/DataTable';
-import { ContentContainer } from '@/components/ui/content-container';
-import { RESOURCES } from '@/constants/resources';
-import type { BlockResponse } from '@/schemas';
-
-import { useBlockCancelledReversibleTransactions } from './hook';
-
-interface Props {
- query: QueryResult;
-}
-
-export const BlockCancelledReversibleTransactions: React.FC = ({
- query
-}) => {
- const { getStatus, table, error } =
- useBlockCancelledReversibleTransactions(query);
-
- return (
-
- Recent Cancelled Reversible Transactions
-
- Error: {error && error.message}
- }}
- />
-
- {!query.loading &&
- query.data?.cancelledReversibleTransactions.aggregate.totalCount !==
- 0 && (
-
- )}
-
- );
-};
diff --git a/src/components/features/block-details/block-cancelled-reversible-transactions/hook.tsx b/src/components/features/block-details/block-cancelled-reversible-transactions/hook.tsx
deleted file mode 100644
index f89bafe..0000000
--- a/src/components/features/block-details/block-cancelled-reversible-transactions/hook.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-import type { QueryResult } from '@apollo/client';
-import { getCoreRowModel, useReactTable } from '@tanstack/react-table';
-import { useMemo } from 'react';
-
-import { BLOCK_CANCELLED_REVERSIBLE_COLUMNS } from '@/components/common/table-columns/BLOCK_CANCELLED_REVERSIBLE_COLUMNS';
-import type {
- BlockCancelledReversibleTransaction,
- BlockResponse
-} from '@/schemas';
-
-export const useBlockCancelledReversibleTransactions = (
- query: QueryResult
-) => {
- const { data, error: fetchError, loading } = query;
- const columns = useMemo(() => BLOCK_CANCELLED_REVERSIBLE_COLUMNS, []);
-
- const tableData = useMemo(
- () => data?.cancelledReversibleTransactions?.nodes ?? [],
- [data?.cancelledReversibleTransactions?.nodes]
- );
-
- const table = useReactTable({
- data: tableData,
- columns: columns as any,
- getCoreRowModel: getCoreRowModel(),
- enableSorting: false
- });
-
- const success = !loading && !fetchError;
- const error = !loading && fetchError;
-
- const getStatus = () => {
- switch (true) {
- case success:
- return 'success';
- case !!error:
- return 'error';
- case !!loading:
- return 'loading';
- default:
- return 'idle';
- }
- };
-
- return {
- table,
- getStatus,
- error
- };
-};
diff --git a/src/components/features/block-details/block-error-events/BlockErrorEvents.tsx b/src/components/features/block-details/block-error-events/BlockErrorEvents.tsx
deleted file mode 100644
index a2df7ee..0000000
--- a/src/components/features/block-details/block-error-events/BlockErrorEvents.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import type { QueryResult } from '@apollo/client';
-import { Link } from '@tanstack/react-router';
-import React from 'react';
-
-import { Button } from '@/components/ui/button';
-import { DataTable } from '@/components/ui/composites/data-table/DataTable';
-import { ContentContainer } from '@/components/ui/content-container';
-import type { BlockResponse } from '@/schemas';
-
-import { useBlockErrorEvents } from './hook';
-
-interface Props {
- query: QueryResult;
-}
-
-export const BlockErrorEvents: React.FC = ({ query }) => {
- const { getStatus, table, error } = useBlockErrorEvents(query);
-
- return (
-
- Recent Error Events
-
- Error: {error && error.message}
- }}
- />
-
- {!query.loading && query.data?.errorEvents.aggregate.totalCount !== 0 && (
-
- )}
-
- );
-};
diff --git a/src/components/features/block-details/block-error-events/hook.tsx b/src/components/features/block-details/block-error-events/hook.tsx
deleted file mode 100644
index d42b44c..0000000
--- a/src/components/features/block-details/block-error-events/hook.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import type { QueryResult } from '@apollo/client';
-import { getCoreRowModel, useReactTable } from '@tanstack/react-table';
-import { useMemo } from 'react';
-
-import { BLOCK_ERROR_EVENT_COLUMNS } from '@/components/common/table-columns/BLOCK_ERROR_EVENT_COLUMNS';
-import type { BlockResponse, BlockErrorEvent } from '@/schemas';
-
-export const useBlockErrorEvents = (query: QueryResult) => {
- const { data, error: fetchError, loading } = query;
- const blockColumns = useMemo(() => BLOCK_ERROR_EVENT_COLUMNS, []);
-
- const table = useReactTable({
- data: data?.errorEvents?.nodes ?? [],
- columns: blockColumns,
- getCoreRowModel: getCoreRowModel(),
- enableSorting: false
- });
-
- const success = !loading && !fetchError;
- const error = !loading && fetchError;
-
- const getStatus = () => {
- switch (true) {
- case success:
- return 'success';
- case !!error:
- return 'error';
- case !!loading:
- return 'loading';
- default:
- return 'idle';
- }
- };
-
- return {
- table,
- getStatus,
- error
- };
-};
diff --git a/src/components/features/block-details/block-executed-reversible-transactions/BlockExecutedReversibleTransactions.tsx b/src/components/features/block-details/block-executed-reversible-transactions/BlockExecutedReversibleTransactions.tsx
deleted file mode 100644
index 2092243..0000000
--- a/src/components/features/block-details/block-executed-reversible-transactions/BlockExecutedReversibleTransactions.tsx
+++ /dev/null
@@ -1,49 +0,0 @@
-import type { QueryResult } from '@apollo/client';
-import { Link } from '@tanstack/react-router';
-import React from 'react';
-
-import { Button } from '@/components/ui/button';
-import { DataTable } from '@/components/ui/composites/data-table/DataTable';
-import { ContentContainer } from '@/components/ui/content-container';
-import { RESOURCES } from '@/constants/resources';
-import type { BlockResponse } from '@/schemas';
-
-import { useBlockExecutedReversibleTransactions } from './hook';
-
-interface Props {
- query: QueryResult;
-}
-
-export const BlockExecutedReversibleTransactions: React.FC = ({
- query
-}) => {
- const { getStatus, table, error } =
- useBlockExecutedReversibleTransactions(query);
-
- return (
-
- Recent Executed Reversible Transactions
-
- Error: {error && error.message}
- }}
- />
-
- {!query.loading &&
- query.data?.executedReversibleTransactions.aggregate.totalCount !==
- 0 && (
-
- )}
-
- );
-};
diff --git a/src/components/features/block-details/block-executed-reversible-transactions/hook.tsx b/src/components/features/block-details/block-executed-reversible-transactions/hook.tsx
deleted file mode 100644
index d7b4185..0000000
--- a/src/components/features/block-details/block-executed-reversible-transactions/hook.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-import type { QueryResult } from '@apollo/client';
-import { getCoreRowModel, useReactTable } from '@tanstack/react-table';
-import { useMemo } from 'react';
-
-import { BLOCK_EXECUTED_REVERSIBLE_COLUMNS } from '@/components/common/table-columns/BLOCK_EXECUTED_REVERSIBLE_COLUMNS';
-import type {
- BlockExecutedReversibleTransaction,
- BlockResponse
-} from '@/schemas';
-
-export const useBlockExecutedReversibleTransactions = (
- query: QueryResult
-) => {
- const { data, error: fetchError, loading } = query;
- const columns = useMemo(() => BLOCK_EXECUTED_REVERSIBLE_COLUMNS, []);
-
- const tableData = useMemo(
- () => data?.executedReversibleTransactions?.nodes ?? [],
- [data?.executedReversibleTransactions?.nodes]
- );
-
- const table = useReactTable({
- data: tableData,
- columns: columns as any,
- getCoreRowModel: getCoreRowModel(),
- enableSorting: false
- });
-
- const success = !loading && !fetchError;
- const error = !loading && fetchError;
-
- const getStatus = () => {
- switch (true) {
- case success:
- return 'success';
- case !!error:
- return 'error';
- case !!loading:
- return 'loading';
- default:
- return 'idle';
- }
- };
-
- return {
- table,
- getStatus,
- error
- };
-};
diff --git a/src/components/features/block-details/block-high-security-sets/BlockHighSecuritySets.tsx b/src/components/features/block-details/block-high-security-sets/BlockHighSecuritySets.tsx
deleted file mode 100644
index eb75a3a..0000000
--- a/src/components/features/block-details/block-high-security-sets/BlockHighSecuritySets.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-import type { QueryResult } from '@apollo/client';
-import { Link } from '@tanstack/react-router';
-import React from 'react';
-
-import { Button } from '@/components/ui/button';
-import { DataTable } from '@/components/ui/composites/data-table/DataTable';
-import { ContentContainer } from '@/components/ui/content-container';
-import type { BlockResponse } from '@/schemas';
-
-import { useBlockHighSecuritySets } from './hook';
-
-interface Props {
- query: QueryResult;
-}
-
-export const BlockHighSecuritySets: React.FC = ({ query }) => {
- const { getStatus, table, error } = useBlockHighSecuritySets(query);
-
- return (
-
- Recent High Security Sets
-
- Error: {error && error.message}
- }}
- />
-
- {!query.loading &&
- query.data?.highSecuritySets.aggregate.totalCount !== 0 && (
-
- )}
-
- );
-};
diff --git a/src/components/features/block-details/block-high-security-sets/hook.tsx b/src/components/features/block-details/block-high-security-sets/hook.tsx
deleted file mode 100644
index 8c45a62..0000000
--- a/src/components/features/block-details/block-high-security-sets/hook.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import type { QueryResult } from '@apollo/client';
-import { getCoreRowModel, useReactTable } from '@tanstack/react-table';
-import { useMemo } from 'react';
-
-import { BLOCK_HIGH_SECURITY_SET_COLUMNS } from '@/components/common/table-columns/BLOCK_HIGH_SECURITY_SET_COLUMNS';
-import type { BlockResponse, BlockHighSecuritySet } from '@/schemas';
-
-export const useBlockHighSecuritySets = (query: QueryResult) => {
- const { data, error: fetchError, loading } = query;
- const blockColumns = useMemo(() => BLOCK_HIGH_SECURITY_SET_COLUMNS, []);
-
- const table = useReactTable({
- data: data?.highSecuritySets?.nodes ?? [],
- columns: blockColumns,
- getCoreRowModel: getCoreRowModel(),
- enableSorting: false
- });
-
- const success = !loading && !fetchError;
- const error = !loading && fetchError;
-
- const getStatus = () => {
- switch (true) {
- case success:
- return 'success';
- case !!error:
- return 'error';
- case !!loading:
- return 'loading';
- default:
- return 'idle';
- }
- };
-
- return {
- table,
- getStatus,
- error
- };
-};
diff --git a/src/components/features/block-details/block-scheduled-reversible-transactions/BlockScheduledReversibleTransactions.tsx b/src/components/features/block-details/block-scheduled-reversible-transactions/BlockScheduledReversibleTransactions.tsx
deleted file mode 100644
index 664e195..0000000
--- a/src/components/features/block-details/block-scheduled-reversible-transactions/BlockScheduledReversibleTransactions.tsx
+++ /dev/null
@@ -1,49 +0,0 @@
-import type { QueryResult } from '@apollo/client';
-import { Link } from '@tanstack/react-router';
-import React from 'react';
-
-import { Button } from '@/components/ui/button';
-import { DataTable } from '@/components/ui/composites/data-table/DataTable';
-import { ContentContainer } from '@/components/ui/content-container';
-import { RESOURCES } from '@/constants/resources';
-import type { BlockResponse } from '@/schemas';
-
-import { useBlockScheduledReversibleTransactions } from './hook';
-
-interface Props {
- query: QueryResult;
-}
-
-export const BlockScheduledReversibleTransactions: React.FC = ({
- query
-}) => {
- const { getStatus, table, error } =
- useBlockScheduledReversibleTransactions(query);
-
- return (
-
- Recent Scheduled Reversible Transactions
-
- Error: {error && error.message}
- }}
- />
-
- {!query.loading &&
- query.data?.scheduledReversibleTransactions.aggregate.totalCount !==
- 0 && (
-
- )}
-
- );
-};
diff --git a/src/components/features/block-details/block-scheduled-reversible-transactions/hook.tsx b/src/components/features/block-details/block-scheduled-reversible-transactions/hook.tsx
deleted file mode 100644
index 6d00b14..0000000
--- a/src/components/features/block-details/block-scheduled-reversible-transactions/hook.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-import type { QueryResult } from '@apollo/client';
-import { getCoreRowModel, useReactTable } from '@tanstack/react-table';
-import { useMemo } from 'react';
-
-import { BLOCK_SCHEDULED_REVERSIBLE_COLUMNS } from '@/components/common/table-columns/BLOCK_SCHEDULED_REVERSIBLE_COLUMNS';
-import type {
- BlockResponse,
- BlockScheduledReversibleTransaction
-} from '@/schemas';
-
-export const useBlockScheduledReversibleTransactions = (
- query: QueryResult
-) => {
- const { data, error: fetchError, loading } = query;
- const columns = useMemo(() => BLOCK_SCHEDULED_REVERSIBLE_COLUMNS, []);
-
- // Map BlockScheduledReversibleTransaction[] to ScheduledReversibleTransaction[]
- const tableData = useMemo(
- () => data?.scheduledReversibleTransactions?.nodes ?? [],
- [data?.scheduledReversibleTransactions?.nodes]
- );
-
- const table = useReactTable({
- data: tableData,
- columns: columns as any,
- getCoreRowModel: getCoreRowModel(),
- enableSorting: false
- });
-
- const success = !loading && !fetchError;
- const error = !loading && fetchError;
-
- const getStatus = () => {
- switch (true) {
- case success:
- return 'success';
- case !!error:
- return 'error';
- case !!loading:
- return 'loading';
- default:
- return 'idle';
- }
- };
-
- return {
- table,
- getStatus,
- error
- };
-};
diff --git a/src/components/features/block-details/block-transactions/BlockTransactions.tsx b/src/components/features/block-details/block-transactions/BlockTransactions.tsx
deleted file mode 100644
index 4751ad6..0000000
--- a/src/components/features/block-details/block-transactions/BlockTransactions.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-import type { QueryResult } from '@apollo/client';
-import { Link } from '@tanstack/react-router';
-import React from 'react';
-
-import { Button } from '@/components/ui/button';
-import { DataTable } from '@/components/ui/composites/data-table/DataTable';
-import { ContentContainer } from '@/components/ui/content-container';
-import type { BlockResponse } from '@/schemas';
-
-import { useBlockTransactions } from './hook';
-
-interface Props {
- query: QueryResult;
-}
-
-export const BlockTransactions: React.FC = ({ query }) => {
- const { getStatus, table, error } = useBlockTransactions(query);
-
- return (
-
- Recent Immediate Transactions
-
- Error: {error && error.message}
- }}
- />
-
- {!query.loading &&
- query.data?.transactions.aggregate.totalCount !== 0 && (
-
- )}
-
- );
-};
diff --git a/src/components/features/block-details/block-transactions/hook.tsx b/src/components/features/block-details/block-transactions/hook.tsx
deleted file mode 100644
index eab0239..0000000
--- a/src/components/features/block-details/block-transactions/hook.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import type { QueryResult } from '@apollo/client';
-import { getCoreRowModel, useReactTable } from '@tanstack/react-table';
-import { useMemo } from 'react';
-
-import { BLOCK_TRANSACTION_COLUMNS } from '@/components/common/table-columns/BLOCK_TRANSACTION_COLUMNS';
-import type { BlockResponse, BlockTransaction } from '@/schemas';
-
-export const useBlockTransactions = (query: QueryResult) => {
- const { data, error: fetchError, loading } = query;
- const blockColumns = useMemo(() => BLOCK_TRANSACTION_COLUMNS, []);
-
- const table = useReactTable({
- data: data?.transactions?.nodes ?? [],
- columns: blockColumns,
- getCoreRowModel: getCoreRowModel(),
- enableSorting: false
- });
-
- const success = !loading && !fetchError;
- const error = !loading && fetchError;
-
- const getStatus = () => {
- switch (true) {
- case success:
- return 'success';
- case !!error:
- return 'error';
- case !!loading:
- return 'loading';
- default:
- return 'idle';
- }
- };
-
- return {
- table,
- getStatus,
- error
- };
-};
diff --git a/src/components/features/cancelled-reversible-transaction-details/cancelled-reversible-transaction-information/CancelledReversibleTransactionInformation.tsx b/src/components/features/cancelled-reversible-transaction-details/cancelled-reversible-transaction-information/CancelledReversibleTransactionInformation.tsx
index aae8734..23912b6 100644
--- a/src/components/features/cancelled-reversible-transaction-details/cancelled-reversible-transaction-information/CancelledReversibleTransactionInformation.tsx
+++ b/src/components/features/cancelled-reversible-transaction-details/cancelled-reversible-transaction-information/CancelledReversibleTransactionInformation.tsx
@@ -29,19 +29,19 @@ export const CancelledReversibleTransactionInformation: React.FC<
const tx = data?.cancelledReversibleTransactions[0];
- const information: Partial[] = [
+ const information: Partial[] = [
{
- tx_id: tx?.node.tx_id,
- block: tx?.node.block,
- timestamp: tx?.node.timestamp,
- cancelledBy: tx?.node.cancelledBy,
- extrinsic: tx?.node.extrinsic,
- scheduledTransfer: tx?.node.scheduledTransfer
+ tx_id: tx?.tx_id,
+ block: tx?.block,
+ timestamp: tx?.timestamp,
+ cancelledBy: tx?.cancelledBy,
+ extrinsic: tx?.extrinsic,
+ scheduledTransfer: tx?.scheduledTransfer
}
];
return (
-