From e54ae84e594f35134eba59b6a6e3574744177170 Mon Sep 17 00:00:00 2001
From: Fuxing Loh <4266087+fuxingloh@users.noreply.github.com>
Date: Thu, 30 Nov 2023 14:10:58 +0800
Subject: [PATCH] feat(website): add RawAccountHistory to show history at txn
history (#1917)
---
next.config.js | 4 +-
src/pages/transactions/[txid].page.tsx | 2 +
.../_components/RawAccountHistory.tsx | 111 ++++++++++++++++++
3 files changed, 115 insertions(+), 2 deletions(-)
create mode 100644 src/pages/transactions/_components/RawAccountHistory.tsx
diff --git a/next.config.js b/next.config.js
index 258a3d470..54ce3c472 100644
--- a/next.config.js
+++ b/next.config.js
@@ -14,8 +14,8 @@ const securityHeaders = [
process.env.NODE_ENV === "development" ? `'unsafe-eval'` : ""
};` +
`style-src 'self' fonts.googleapis.com 'unsafe-inline';` +
- `font-src fonts.gstatic.com;` +
- `connect-src 'self' ocean.defichain.com 35.241.191.23:3000 *.jellyfishsdk.com playground.jellyfishsdk.com wallet.defichain.com; ${
+ `font-src fonts.gstatic.com data:;` +
+ `connect-src 'self' ocean.defichain.com 35.241.191.23:3000 *.jellyfishsdk.com playground.jellyfishsdk.com wallet.defichain.com ${
process.env.NODE_ENV === "development"
? `ws://localhost:3000/_next/webpack-hmr`
: ""
diff --git a/src/pages/transactions/[txid].page.tsx b/src/pages/transactions/[txid].page.tsx
index a7449bc2f..8ebf51b9f 100644
--- a/src/pages/transactions/[txid].page.tsx
+++ b/src/pages/transactions/[txid].page.tsx
@@ -31,6 +31,7 @@ import { TransactionSummaryTable } from "./_components/TransactionSummaryTable";
import { TransactionDfTx } from "./_components/TransactionDfTx";
import { isAlphanumeric } from "../../utils/commons/StringValidator";
import { RawTransaction } from "./_components/RawTransaction";
+import { RawAccountHistory } from "./_components/RawAccountHistory";
interface TransactionPageProps {
txid: string;
@@ -103,6 +104,7 @@ export default function TransactionPage(
isEvmTx={isEvmTx}
/>
+ Query raw defid account state at TxId:{" "}
+
+ {props.transaction.txid}
+
{" "}
+ and TxNo:{" "}
+
+ {props.transaction.order}
+
+
{JSON.stringify(response, null, 2)}+