Skip to content

Commit db87d77

Browse files
committed
Merge branch 'main' into release
2 parents 5687bea + 6584897 commit db87d77

File tree

6 files changed

+28
-8
lines changed

6 files changed

+28
-8
lines changed

mfer-safe-desktop-app/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mfer-safe-desktop-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mfer-safe",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"private": true,
55
"dependencies": {
66
"@emotion/react": "^11.9.3",

mfer-safe-desktop-app/src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"package": {
1010
"productName": "MferSafe",
11-
"version": "0.1.5"
11+
"version": "0.1.6"
1212
},
1313
"tauri": {
1414
"allowlist": {

mfer-safe-desktop-app/src/SettingsView.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import LanIcon from "@mui/icons-material/Lan";
1616
import MapIcon from "@mui/icons-material/Map";
1717
import ConfirmationNumberIcon from "@mui/icons-material/ConfirmationNumber";
1818
import MoreTimeIcon from "@mui/icons-material/MoreTime";
19+
import FingerprintIcon from '@mui/icons-material/Fingerprint';
1920
import { ethers } from "ethers";
2021
import { invoke } from "@tauri-apps/api/tauri";
2122

@@ -54,6 +55,7 @@ export default function SettingsView() {
5455
const [batchSize, setBatchSize] = useState(100);
5556
const [blockNumberDelta, setBlockNumberDelta] = useState(0);
5657
const [blockTimeDelta, setBlockTimeDelta] = useState(0);
58+
const [chainID, setChainID] = useState("0x0");
5759
const [keyCacheFilePath, setKeyCacheFilePath] = useState("");
5860
const [addrRandomize, setAddrRandomize] = useState(false);
5961
const [passthrough, setPassthrough] = useState(true);
@@ -87,6 +89,11 @@ export default function SettingsView() {
8789
.then((result) => {
8890
setBlockTimeDelta(result.result);
8991
});
92+
docall("eth_chainId", [])
93+
.then((res) => res.json())
94+
.then((result) => {
95+
setChainID(result.result);
96+
});
9097

9198
docall("mfer_randAddrEnabled", [])
9299
.then((res) => res.json())
@@ -152,6 +159,10 @@ export default function SettingsView() {
152159
docall("mfer_setTimeDelta", [Number(blockTimeDelta)]);
153160
}, [blockTimeDelta]);
154161

162+
const setCID = useCallback(() => {
163+
docall("mfer_overrideChainID", [chainID]);
164+
}, [chainID]);
165+
155166
const setEnableRandAddr = (e) => {
156167
docall("mfer_toggleRandAddr", [e.target.checked]);
157168
setAddrRandomize(e.target.checked);
@@ -216,6 +227,15 @@ export default function SettingsView() {
216227
icon={ViewModuleIcon}
217228
onClick={() => setBatch()}
218229
/>
230+
<IconButtonTextField
231+
state={chainID}
232+
setState={setChainID}
233+
label="Override ChainID (hex with 0x prefix)"
234+
icon={FingerprintIcon}
235+
onClick={() => setCID()}
236+
/>
237+
</Stack>
238+
<Stack direction="row" width="100%">
219239
<IconButtonTextField
220240
state={blockNumberDelta}
221241
setState={setBlockNumberDelta}

mfer-safe-desktop-app/src/SimulateView.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ function SimulateView() {
168168
simulate(setCallTrace, participants);
169169
}}
170170
>
171-
🙉Simulate
171+
Build and Simulate ⛑️
172172
</Button>
173173
</div>
174174
<TextField
@@ -193,10 +193,10 @@ function SimulateView() {
193193
{participants.map((participant, idx) => {
194194
// console.log(participant);
195195
return <TextField
196-
label={participant}
196+
label={"Address: " + participant}
197197
key={idx}
198198
helperText="Signature override"
199-
value={overrideSignature[participant] || ""}
199+
value={ overrideSignature[participant] || ""}
200200
onChange={(e) => {
201201
var sig = e.target.value;
202202
var newOverridedSig = { ...overrideSignature, [participant]: sig };

0 commit comments

Comments
 (0)