@rubanrubi/hardhat-dashboard 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/ui/app.js +117 -101
- package/dist/ui/app.js.map +4 -4
- package/dist/ui/styles.css +15 -18
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,17 @@ All notable changes to `@rubanrubi/hardhat-dashboard` are documented here.
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## [0.2.2] — 2026-03-30
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **Wallet badge alignment** — redesigned from a vertical column card to a single horizontal pill (`border-radius: 999px`) that sits flush with the WebSocket and Last update pills; items are now centre-aligned via `align-items: center` on the hero-meta row.
|
|
12
|
+
- **Session History count** — status strip now counts only signing and deployment events (`eth_sendTransaction`, `eth_sign*`, `personal_sign`) matching the Tx History panel filter, instead of all RPC calls.
|
|
13
|
+
- **Tx hash copy button** — confirmed deployment/transaction entries in Tx History now show a **Copy** button next to the truncated hash to copy the full hash to the clipboard.
|
|
14
|
+
- **Shared CopyButton component** — extracted clipboard copy logic into a reusable `CopyButton` component used by both the wallet badge and the Tx History hash row.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
7
18
|
## [0.2.0] — 2026-03-29
|
|
8
19
|
|
|
9
20
|
### Added
|
package/dist/ui/app.js
CHANGED
|
@@ -2433,7 +2433,7 @@ var require_react_dom_development = __commonJS({
|
|
|
2433
2433
|
var HostPortal = 4;
|
|
2434
2434
|
var HostComponent = 5;
|
|
2435
2435
|
var HostText = 6;
|
|
2436
|
-
var
|
|
2436
|
+
var Fragment2 = 7;
|
|
2437
2437
|
var Mode = 8;
|
|
2438
2438
|
var ContextConsumer = 9;
|
|
2439
2439
|
var ContextProvider = 10;
|
|
@@ -3590,7 +3590,7 @@ var require_react_dom_development = __commonJS({
|
|
|
3590
3590
|
return "DehydratedFragment";
|
|
3591
3591
|
case ForwardRef:
|
|
3592
3592
|
return getWrappedName$1(type, type.render, "ForwardRef");
|
|
3593
|
-
case
|
|
3593
|
+
case Fragment2:
|
|
3594
3594
|
return "Fragment";
|
|
3595
3595
|
case HostComponent:
|
|
3596
3596
|
return type;
|
|
@@ -12019,7 +12019,7 @@ var require_react_dom_development = __commonJS({
|
|
|
12019
12019
|
}
|
|
12020
12020
|
}
|
|
12021
12021
|
function updateFragment2(returnFiber, current2, fragment, lanes, key) {
|
|
12022
|
-
if (current2 === null || current2.tag !==
|
|
12022
|
+
if (current2 === null || current2.tag !== Fragment2) {
|
|
12023
12023
|
var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
|
|
12024
12024
|
created.return = returnFiber;
|
|
12025
12025
|
return created;
|
|
@@ -12422,7 +12422,7 @@ var require_react_dom_development = __commonJS({
|
|
|
12422
12422
|
if (child.key === key) {
|
|
12423
12423
|
var elementType = element.type;
|
|
12424
12424
|
if (elementType === REACT_FRAGMENT_TYPE) {
|
|
12425
|
-
if (child.tag ===
|
|
12425
|
+
if (child.tag === Fragment2) {
|
|
12426
12426
|
deleteRemainingChildren(returnFiber, child.sibling);
|
|
12427
12427
|
var existing = useFiber(child, element.props.children);
|
|
12428
12428
|
existing.return = returnFiber;
|
|
@@ -17898,7 +17898,7 @@ var require_react_dom_development = __commonJS({
|
|
|
17898
17898
|
var _resolvedProps2 = workInProgress2.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
|
|
17899
17899
|
return updateForwardRef(current2, workInProgress2, type, _resolvedProps2, renderLanes2);
|
|
17900
17900
|
}
|
|
17901
|
-
case
|
|
17901
|
+
case Fragment2:
|
|
17902
17902
|
return updateFragment(current2, workInProgress2, renderLanes2);
|
|
17903
17903
|
case Mode:
|
|
17904
17904
|
return updateMode(current2, workInProgress2, renderLanes2);
|
|
@@ -18170,7 +18170,7 @@ var require_react_dom_development = __commonJS({
|
|
|
18170
18170
|
case SimpleMemoComponent:
|
|
18171
18171
|
case FunctionComponent:
|
|
18172
18172
|
case ForwardRef:
|
|
18173
|
-
case
|
|
18173
|
+
case Fragment2:
|
|
18174
18174
|
case Mode:
|
|
18175
18175
|
case Profiler:
|
|
18176
18176
|
case ContextConsumer:
|
|
@@ -22431,7 +22431,7 @@ var require_react_dom_development = __commonJS({
|
|
|
22431
22431
|
return fiber;
|
|
22432
22432
|
}
|
|
22433
22433
|
function createFiberFromFragment(elements, mode, lanes, key) {
|
|
22434
|
-
var fiber = createFiber(
|
|
22434
|
+
var fiber = createFiber(Fragment2, elements, key, mode);
|
|
22435
22435
|
fiber.lanes = lanes;
|
|
22436
22436
|
return fiber;
|
|
22437
22437
|
}
|
|
@@ -24463,10 +24463,10 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
24463
24463
|
return jsxWithValidation(type, props, key, false);
|
|
24464
24464
|
}
|
|
24465
24465
|
}
|
|
24466
|
-
var
|
|
24466
|
+
var jsx6 = jsxWithValidationDynamic;
|
|
24467
24467
|
var jsxs5 = jsxWithValidationStatic;
|
|
24468
24468
|
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
24469
|
-
exports.jsx =
|
|
24469
|
+
exports.jsx = jsx6;
|
|
24470
24470
|
exports.jsxs = jsxs5;
|
|
24471
24471
|
})();
|
|
24472
24472
|
}
|
|
@@ -24670,8 +24670,22 @@ function PendingTxCard({
|
|
|
24670
24670
|
] });
|
|
24671
24671
|
}
|
|
24672
24672
|
|
|
24673
|
-
// src/ui/components/
|
|
24673
|
+
// src/ui/components/CopyButton.tsx
|
|
24674
|
+
var import_react = __toESM(require_react());
|
|
24674
24675
|
var import_jsx_runtime2 = __toESM(require_jsx_runtime());
|
|
24676
|
+
function CopyButton({ text, label = "Copy" }) {
|
|
24677
|
+
const [copied, setCopied] = (0, import_react.useState)(false);
|
|
24678
|
+
function handleCopy() {
|
|
24679
|
+
void navigator.clipboard.writeText(text).then(() => {
|
|
24680
|
+
setCopied(true);
|
|
24681
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
24682
|
+
});
|
|
24683
|
+
}
|
|
24684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { className: "copy-btn", onClick: handleCopy, title: text, children: copied ? "\u2713" : label });
|
|
24685
|
+
}
|
|
24686
|
+
|
|
24687
|
+
// src/ui/components/TxHistory.tsx
|
|
24688
|
+
var import_jsx_runtime3 = __toESM(require_jsx_runtime());
|
|
24675
24689
|
var DEPLOYMENT_METHODS = /* @__PURE__ */ new Set([
|
|
24676
24690
|
"eth_sendTransaction",
|
|
24677
24691
|
"eth_sign",
|
|
@@ -24732,77 +24746,69 @@ function getTxHash(entry) {
|
|
|
24732
24746
|
function TxHistory({ entries }) {
|
|
24733
24747
|
const relevant = entries.filter((e) => DEPLOYMENT_METHODS.has(e.method));
|
|
24734
24748
|
if (!relevant.length) {
|
|
24735
|
-
return /* @__PURE__ */ (0,
|
|
24749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "empty-state", children: "Confirmed transactions and signing events will appear here during this session." });
|
|
24736
24750
|
}
|
|
24737
|
-
return /* @__PURE__ */ (0,
|
|
24751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "card-list", children: relevant.map((entry) => {
|
|
24738
24752
|
const actionSummary = getActionSummary(entry);
|
|
24739
24753
|
const txHash = getTxHash(entry);
|
|
24740
|
-
return /* @__PURE__ */ (0,
|
|
24741
|
-
/* @__PURE__ */ (0,
|
|
24742
|
-
/* @__PURE__ */ (0,
|
|
24743
|
-
/* @__PURE__ */ (0,
|
|
24744
|
-
/* @__PURE__ */ (0,
|
|
24754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("article", { className: "history-card", children: [
|
|
24755
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "history-top", children: [
|
|
24756
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
24757
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "method", children: getMethodLabel2(entry.method) }),
|
|
24758
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "timestamp", children: [
|
|
24745
24759
|
formatTimestamp2(entry.createdAt),
|
|
24746
24760
|
" \u2192 ",
|
|
24747
24761
|
formatTimestamp2(entry.completedAt)
|
|
24748
24762
|
] })
|
|
24749
24763
|
] }),
|
|
24750
|
-
/* @__PURE__ */ (0,
|
|
24764
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: `tag ${getStatusClass(entry.status)}`, children: entry.status })
|
|
24751
24765
|
] }),
|
|
24752
|
-
actionSummary ? /* @__PURE__ */ (0,
|
|
24753
|
-
entry.decodedCall?.matched ? /* @__PURE__ */ (0,
|
|
24754
|
-
/* @__PURE__ */ (0,
|
|
24766
|
+
actionSummary ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "history-action", children: actionSummary }) : null,
|
|
24767
|
+
entry.decodedCall?.matched ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: "decoded-call", children: [
|
|
24768
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("strong", { children: [
|
|
24755
24769
|
entry.decodedCall.contractName,
|
|
24756
24770
|
".",
|
|
24757
24771
|
entry.decodedCall.functionName
|
|
24758
24772
|
] }),
|
|
24759
|
-
/* @__PURE__ */ (0,
|
|
24773
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "decoded-sig", children: entry.decodedCall.signature })
|
|
24760
24774
|
] }) : null,
|
|
24761
|
-
txHash ? /* @__PURE__ */ (0,
|
|
24762
|
-
/* @__PURE__ */ (0,
|
|
24763
|
-
/* @__PURE__ */ (0,
|
|
24775
|
+
txHash ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "history-hash", children: [
|
|
24776
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "tx-field-label", children: "Tx hash" }),
|
|
24777
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "history-hash-value mono", children: [
|
|
24764
24778
|
txHash.slice(0, 18),
|
|
24765
24779
|
"...",
|
|
24766
24780
|
txHash.slice(-8)
|
|
24767
|
-
] })
|
|
24781
|
+
] }),
|
|
24782
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CopyButton, { text: txHash })
|
|
24768
24783
|
] }) : null,
|
|
24769
|
-
entry.error ? /* @__PURE__ */ (0,
|
|
24784
|
+
entry.error ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "history-error", children: entry.error.message }) : null
|
|
24770
24785
|
] }, entry.queueId);
|
|
24771
24786
|
}) });
|
|
24772
24787
|
}
|
|
24773
24788
|
|
|
24774
24789
|
// src/ui/components/WalletBadge.tsx
|
|
24775
|
-
var
|
|
24776
|
-
var import_jsx_runtime3 = __toESM(require_jsx_runtime());
|
|
24790
|
+
var import_jsx_runtime4 = __toESM(require_jsx_runtime());
|
|
24777
24791
|
function WalletBadge({ wallet }) {
|
|
24778
|
-
const [copied, setCopied] = (0, import_react.useState)(false);
|
|
24779
|
-
function copyAddress() {
|
|
24780
|
-
if (!wallet.account) return;
|
|
24781
|
-
void navigator.clipboard.writeText(wallet.account).then(() => {
|
|
24782
|
-
setCopied(true);
|
|
24783
|
-
setTimeout(() => setCopied(false), 2e3);
|
|
24784
|
-
});
|
|
24785
|
-
}
|
|
24786
24792
|
if (!wallet.available) {
|
|
24787
|
-
return /* @__PURE__ */ (0,
|
|
24793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "pill", children: "MetaMask not detected" });
|
|
24788
24794
|
}
|
|
24789
24795
|
if (!wallet.connected) {
|
|
24790
|
-
return /* @__PURE__ */ (0,
|
|
24791
|
-
/* @__PURE__ */ (0,
|
|
24792
|
-
/* @__PURE__ */ (0,
|
|
24796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "pill", children: [
|
|
24797
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("strong", { children: wallet.walletName }),
|
|
24798
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: wallet.locked ? "Locked or not connected" : "Waiting for account access" })
|
|
24793
24799
|
] });
|
|
24794
24800
|
}
|
|
24795
24801
|
const shortAddress = wallet.account ? `${wallet.account.slice(0, 6)}...${wallet.account.slice(-4)}` : "No account";
|
|
24796
|
-
return /* @__PURE__ */ (0,
|
|
24797
|
-
/* @__PURE__ */ (0,
|
|
24798
|
-
|
|
24799
|
-
|
|
24800
|
-
|
|
24801
|
-
/* @__PURE__ */ (0,
|
|
24802
|
-
|
|
24803
|
-
/* @__PURE__ */ (0,
|
|
24804
|
-
|
|
24805
|
-
|
|
24802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "wallet-info-pill", children: [
|
|
24803
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "wallet-dot" }),
|
|
24804
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("strong", { className: "wallet-network-name", children: wallet.networkName ?? wallet.chainId ?? "Connected" }),
|
|
24805
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "wallet-sep", children: "\xB7" }),
|
|
24806
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "wallet-address", title: wallet.account, children: shortAddress }),
|
|
24807
|
+
wallet.account ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CopyButton, { text: wallet.account }) : null,
|
|
24808
|
+
wallet.balance ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
24809
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "wallet-sep", children: "\xB7" }),
|
|
24810
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "wallet-balance", children: wallet.balance })
|
|
24811
|
+
] }) : null
|
|
24806
24812
|
] });
|
|
24807
24813
|
}
|
|
24808
24814
|
|
|
@@ -24992,7 +24998,7 @@ function subscribeToWallet(onChange, provider = getEthereumProvider()) {
|
|
|
24992
24998
|
}
|
|
24993
24999
|
|
|
24994
25000
|
// src/ui/app.tsx
|
|
24995
|
-
var
|
|
25001
|
+
var import_jsx_runtime5 = __toESM(require_jsx_runtime());
|
|
24996
25002
|
var INITIAL_SNAPSHOT = {
|
|
24997
25003
|
pending: [],
|
|
24998
25004
|
history: [],
|
|
@@ -25160,75 +25166,85 @@ function App() {
|
|
|
25160
25166
|
} else if (!wallet.connected) {
|
|
25161
25167
|
warnings.push("Connect MetaMask to this page so the dashboard can forward queued requests.");
|
|
25162
25168
|
}
|
|
25163
|
-
return /* @__PURE__ */ (0,
|
|
25164
|
-
/* @__PURE__ */ (0,
|
|
25165
|
-
/* @__PURE__ */ (0,
|
|
25166
|
-
/* @__PURE__ */ (0,
|
|
25167
|
-
/* @__PURE__ */ (0,
|
|
25169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("main", { className: "app-shell", children: [
|
|
25170
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: "hero", children: [
|
|
25171
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "hero-card", children: [
|
|
25172
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h1", { children: "Review every Hardhat request before it hits the wallet." }),
|
|
25173
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { children: [
|
|
25168
25174
|
"This dashboard keeps private keys out of ",
|
|
25169
|
-
/* @__PURE__ */ (0,
|
|
25175
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("code", { children: "hardhat.config.ts" }),
|
|
25170
25176
|
" by routing JSON-RPC calls through a local approval queue. Signatures stay inside MetaMask and connected hardware wallets."
|
|
25171
25177
|
] }),
|
|
25172
|
-
/* @__PURE__ */ (0,
|
|
25173
|
-
/* @__PURE__ */ (0,
|
|
25174
|
-
/* @__PURE__ */ (0,
|
|
25178
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "hero-meta", children: [
|
|
25179
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(WalletBadge, { wallet }),
|
|
25180
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "pill", children: [
|
|
25175
25181
|
"WebSocket ",
|
|
25176
25182
|
socketConnected ? "connected" : "offline"
|
|
25177
25183
|
] }),
|
|
25178
|
-
/* @__PURE__ */ (0,
|
|
25184
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "pill", children: [
|
|
25179
25185
|
"Last update ",
|
|
25180
25186
|
formatLastUpdated(snapshot.updatedAt)
|
|
25181
25187
|
] })
|
|
25182
25188
|
] })
|
|
25183
25189
|
] }),
|
|
25184
|
-
/* @__PURE__ */ (0,
|
|
25185
|
-
/* @__PURE__ */ (0,
|
|
25186
|
-
/* @__PURE__ */ (0,
|
|
25190
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("aside", { className: "hero-card status-card", children: [
|
|
25191
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { children: "Wallet Control" }),
|
|
25192
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { children: [
|
|
25187
25193
|
"Open MetaMask in this browser profile, connect the page, then leave this tab visible while running ",
|
|
25188
|
-
/* @__PURE__ */ (0,
|
|
25194
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("code", { children: "--network dashboard" }),
|
|
25189
25195
|
" commands from Hardhat."
|
|
25190
25196
|
] }),
|
|
25191
|
-
/* @__PURE__ */ (0,
|
|
25192
|
-
/* @__PURE__ */ (0,
|
|
25193
|
-
/* @__PURE__ */ (0,
|
|
25197
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "button-row", children: [
|
|
25198
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { className: "button-primary", onClick: () => void handleConnectWallet(), children: wallet.connected ? "Reconnect Wallet" : "Connect Wallet" }),
|
|
25199
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { className: "button-secondary", onClick: () => window.location.reload(), children: "Reload UI" })
|
|
25194
25200
|
] })
|
|
25195
25201
|
] })
|
|
25196
25202
|
] }),
|
|
25197
|
-
/* @__PURE__ */ (0,
|
|
25198
|
-
/* @__PURE__ */ (0,
|
|
25199
|
-
/* @__PURE__ */ (0,
|
|
25200
|
-
/* @__PURE__ */ (0,
|
|
25203
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: "status-strip", children: [
|
|
25204
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "metric", children: [
|
|
25205
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "label", children: "Pending" }),
|
|
25206
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: snapshot.pending.length })
|
|
25201
25207
|
] }),
|
|
25202
|
-
/* @__PURE__ */ (0,
|
|
25203
|
-
/* @__PURE__ */ (0,
|
|
25204
|
-
/* @__PURE__ */ (0,
|
|
25208
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "metric", children: [
|
|
25209
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "label", children: "Session History" }),
|
|
25210
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: snapshot.history.filter(
|
|
25211
|
+
(e) => [
|
|
25212
|
+
"eth_sendTransaction",
|
|
25213
|
+
"eth_sign",
|
|
25214
|
+
"personal_sign",
|
|
25215
|
+
"eth_signTypedData",
|
|
25216
|
+
"eth_signTypedData_v1",
|
|
25217
|
+
"eth_signTypedData_v3",
|
|
25218
|
+
"eth_signTypedData_v4"
|
|
25219
|
+
].includes(e.method)
|
|
25220
|
+
).length })
|
|
25205
25221
|
] }),
|
|
25206
|
-
/* @__PURE__ */ (0,
|
|
25207
|
-
/* @__PURE__ */ (0,
|
|
25208
|
-
/* @__PURE__ */ (0,
|
|
25222
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "metric", children: [
|
|
25223
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "label", children: "Network" }),
|
|
25224
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: wallet.networkName ?? wallet.chainId ?? "Not connected" })
|
|
25209
25225
|
] }),
|
|
25210
|
-
/* @__PURE__ */ (0,
|
|
25211
|
-
/* @__PURE__ */ (0,
|
|
25212
|
-
/* @__PURE__ */ (0,
|
|
25226
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "metric", children: [
|
|
25227
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "label", children: "Balance" }),
|
|
25228
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: wallet.balance ?? (wallet.connected ? "Fetching\u2026" : "\u2014") })
|
|
25213
25229
|
] })
|
|
25214
25230
|
] }),
|
|
25215
|
-
warnings.length > 0 || errorMessage ? /* @__PURE__ */ (0,
|
|
25216
|
-
warnings.map((warning) => /* @__PURE__ */ (0,
|
|
25217
|
-
/* @__PURE__ */ (0,
|
|
25218
|
-
/* @__PURE__ */ (0,
|
|
25231
|
+
warnings.length > 0 || errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { children: [
|
|
25232
|
+
warnings.map((warning) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "warning-banner", children: [
|
|
25233
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: "Attention" }),
|
|
25234
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { children: warning })
|
|
25219
25235
|
] }, warning)),
|
|
25220
|
-
errorMessage ? /* @__PURE__ */ (0,
|
|
25221
|
-
/* @__PURE__ */ (0,
|
|
25222
|
-
/* @__PURE__ */ (0,
|
|
25236
|
+
errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "warning-banner", children: [
|
|
25237
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: "Wallet error" }),
|
|
25238
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { children: errorMessage })
|
|
25223
25239
|
] }) : null
|
|
25224
25240
|
] }) : null,
|
|
25225
|
-
/* @__PURE__ */ (0,
|
|
25226
|
-
/* @__PURE__ */ (0,
|
|
25227
|
-
/* @__PURE__ */ (0,
|
|
25228
|
-
/* @__PURE__ */ (0,
|
|
25229
|
-
/* @__PURE__ */ (0,
|
|
25241
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: "dashboard-grid", children: [
|
|
25242
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "panel", children: [
|
|
25243
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "panel-header", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
|
|
25244
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { children: "Pending Requests" }),
|
|
25245
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "panel-subtitle", children: "Signing methods require your confirmation. Read-only calls run automatically once the wallet is connected." })
|
|
25230
25246
|
] }) }),
|
|
25231
|
-
/* @__PURE__ */ (0,
|
|
25247
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "card-list", children: snapshot.pending.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "empty-state", children: "No requests are waiting for approval." }) : snapshot.pending.map((request) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
25232
25248
|
PendingTxCard,
|
|
25233
25249
|
{
|
|
25234
25250
|
request,
|
|
@@ -25239,12 +25255,12 @@ function App() {
|
|
|
25239
25255
|
request.queueId
|
|
25240
25256
|
)) })
|
|
25241
25257
|
] }),
|
|
25242
|
-
/* @__PURE__ */ (0,
|
|
25243
|
-
/* @__PURE__ */ (0,
|
|
25244
|
-
/* @__PURE__ */ (0,
|
|
25245
|
-
/* @__PURE__ */ (0,
|
|
25258
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "panel", children: [
|
|
25259
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "panel-header", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
|
|
25260
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { children: "Tx History" }),
|
|
25261
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "panel-subtitle", children: "Confirmed, rejected, failed, and expired requests from this session." })
|
|
25246
25262
|
] }) }),
|
|
25247
|
-
/* @__PURE__ */ (0,
|
|
25263
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TxHistory, { entries: snapshot.history })
|
|
25248
25264
|
] })
|
|
25249
25265
|
] })
|
|
25250
25266
|
] });
|
|
@@ -25253,7 +25269,7 @@ var container = document.getElementById("root");
|
|
|
25253
25269
|
if (!container) {
|
|
25254
25270
|
throw new Error("Unable to find the dashboard root element.");
|
|
25255
25271
|
}
|
|
25256
|
-
(0, import_client.createRoot)(container).render(/* @__PURE__ */ (0,
|
|
25272
|
+
(0, import_client.createRoot)(container).render(/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(App, {}));
|
|
25257
25273
|
/*! Bundled license information:
|
|
25258
25274
|
|
|
25259
25275
|
react/cjs/react.development.js:
|