Skip to content

Commit fd593e9

Browse files
committed
Last commit
1 parent ccf5c9c commit fd593e9

5 files changed

Lines changed: 11 additions & 19 deletions

File tree

Frontend/src/components/MultiChainDashboard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { config } from '../config';
66

77
const registryAddress = config.registryAddress;
88
const monitorAddress = config.monitorAddress;
9-
const reporterAddress = config.healthReporterAddress;
9+
const reporterAddress = config.monitorAddress;
1010
const defaultChainId = config.chainId;
1111

1212
const RegistryAbi = [

Frontend/src/components/OperatorIncentives.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,11 @@ import { parseEther, formatEther } from 'viem';
99
const registryAddress = appConfig.registryAddress as `0x${string}`;
1010
const rawChainId = appConfig.chainId;
1111
const chainId = (() => {
12-
if (typeof rawChainId === 'bigint') return rawChainId;
13-
if (typeof rawChainId === 'number' && Number.isInteger(rawChainId) && rawChainId > 0) {
12+
if (Number.isFinite(rawChainId) && rawChainId > 0) {
1413
return BigInt(rawChainId);
1514
}
16-
if (typeof rawChainId === 'string' && rawChainId.trim()) {
17-
try {
18-
const parsed = BigInt(rawChainId.trim());
19-
if (parsed > 0n) return parsed;
20-
} catch {
21-
// fall through to default
22-
}
23-
}
2415
console.error('Invalid chainId:', rawChainId, '- using default 421614');
25-
return 421614n;
16+
return BigInt(421614);
2617
})();
2718

2819
const RegistryAbi = [

Frontend/src/components/ResponsePanel.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const ResponsePanel = () => {
2121
const { role, setRole } = useRole();
2222

2323
const { address, isConnected } = useAccount();
24-
const reporterAddress = config.healthReporterAddress;
24+
const reporterAddress = config.monitorAddress;
2525
const registryAddress = config.registryAddress;
2626
const chainId = config.chainId;
2727

@@ -163,12 +163,12 @@ const ResponsePanel = () => {
163163
];
164164
const incidentManager = new ethers.Contract(incidentManagerAddress, IncidentManagerAbi, signer);
165165
const nextId = await incidentManager.nextIncidentId();
166-
if (nextId <= 1n) {
166+
if (nextId <= BigInt(1)) {
167167
setTxLoading(false);
168168
setActionStatus('No incidents to resolve.');
169169
return;
170170
}
171-
const latestIncidentId = nextId - 1n;
171+
const latestIncidentId = nextId - BigInt(1);
172172
tx = await incidentManager.resolveIncident(latestIncidentId, 'Resolved via Dashboard');
173173
} else {
174174
setTxLoading(false);

Frontend/src/components/SystemLayersStatus.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { config } from '../config';
66

77
const registryAddress = config.registryAddress;
88
const monitorAddress = config.monitorAddress;
9-
const reporterAddress = config.healthReporterAddress;
9+
const reporterAddress = config.monitorAddress;
1010
const chainId = config.chainId;
1111

1212
// ABIs

reference/forge-std-test/StdCheats.t.sol

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
// SPDX-License-Identifier: MIT OR Apache-2.0
22
pragma solidity >=0.8.13 <0.9.0;
33

4-
import {Test} from "forge-std/Test.sol";
5-
import {stdJson} from "forge-std/StdJson.sol";
6-
import {stdToml} from "../src/StdToml.sol";
4+
import {Test} from "lib/forge-std/src/Test.sol";
5+
import {StdCheats} from "lib/forge-std/src/StdCheats.sol";
6+
import {stdJson} from "lib/forge-std/src/StdJson.sol";
7+
import {stdToml} from "lib/forge-std/src/StdToml.sol";
78

89
contract StdCheatsTest is Test {
910
Bar test;

0 commit comments

Comments
 (0)