From a883eb7582b8942d96ffbb832d415511a941291c Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 16 Sep 2022 10:34:01 +0800 Subject: [PATCH 1/3] rename button --- mfer-safe-desktop-app/src/SimulateView.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mfer-safe-desktop-app/src/SimulateView.js b/mfer-safe-desktop-app/src/SimulateView.js index ac69210..99a8907 100644 --- a/mfer-safe-desktop-app/src/SimulateView.js +++ b/mfer-safe-desktop-app/src/SimulateView.js @@ -168,7 +168,7 @@ function SimulateView() { simulate(setCallTrace, participants); }} > - 🙉Simulate + Build and Simulate ⛑️ { // console.log(participant); return { var sig = e.target.value; var newOverridedSig = { ...overrideSignature, [participant]: sig }; From 8bd0dafd6b1b40c2b0b313b5022073e7f956df37 Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 16 Sep 2022 12:03:54 +0800 Subject: [PATCH 2/3] add override chainid button --- mfer-node | 2 +- mfer-safe-desktop-app/src/SettingsView.js | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/mfer-node b/mfer-node index 07a3f31..c0171ee 160000 --- a/mfer-node +++ b/mfer-node @@ -1 +1 @@ -Subproject commit 07a3f31738fd8a55f13183ee2b20b4fcb6fe724a +Subproject commit c0171ee7dcb59b9fb56743a40f49af9a0c6cdb01 diff --git a/mfer-safe-desktop-app/src/SettingsView.js b/mfer-safe-desktop-app/src/SettingsView.js index 8e9b558..a345ef7 100644 --- a/mfer-safe-desktop-app/src/SettingsView.js +++ b/mfer-safe-desktop-app/src/SettingsView.js @@ -16,6 +16,7 @@ import LanIcon from "@mui/icons-material/Lan"; import MapIcon from "@mui/icons-material/Map"; import ConfirmationNumberIcon from "@mui/icons-material/ConfirmationNumber"; import MoreTimeIcon from "@mui/icons-material/MoreTime"; +import FingerprintIcon from '@mui/icons-material/Fingerprint'; import { ethers } from "ethers"; import { invoke } from "@tauri-apps/api/tauri"; @@ -54,6 +55,7 @@ export default function SettingsView() { const [batchSize, setBatchSize] = useState(100); const [blockNumberDelta, setBlockNumberDelta] = useState(0); const [blockTimeDelta, setBlockTimeDelta] = useState(0); + const [chainID, setChainID] = useState("0x0"); const [keyCacheFilePath, setKeyCacheFilePath] = useState(""); const [addrRandomize, setAddrRandomize] = useState(false); const [passthrough, setPassthrough] = useState(true); @@ -87,6 +89,11 @@ export default function SettingsView() { .then((result) => { setBlockTimeDelta(result.result); }); + docall("eth_chainId", []) + .then((res) => res.json()) + .then((result) => { + setChainID(result.result); + }); docall("mfer_randAddrEnabled", []) .then((res) => res.json()) @@ -152,6 +159,10 @@ export default function SettingsView() { docall("mfer_setTimeDelta", [Number(blockTimeDelta)]); }, [blockTimeDelta]); + const setCID = useCallback(() => { + docall("mfer_overrideChainID", [chainID]); + }, [chainID]); + const setEnableRandAddr = (e) => { docall("mfer_toggleRandAddr", [e.target.checked]); setAddrRandomize(e.target.checked); @@ -216,6 +227,15 @@ export default function SettingsView() { icon={ViewModuleIcon} onClick={() => setBatch()} /> + setCID()} + /> + + Date: Fri, 16 Sep 2022 12:05:56 +0800 Subject: [PATCH 3/3] bump version to 0.1.6 --- mfer-safe-desktop-app/package-lock.json | 4 ++-- mfer-safe-desktop-app/package.json | 2 +- mfer-safe-desktop-app/src-tauri/tauri.conf.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mfer-safe-desktop-app/package-lock.json b/mfer-safe-desktop-app/package-lock.json index 9a1be19..737b25a 100644 --- a/mfer-safe-desktop-app/package-lock.json +++ b/mfer-safe-desktop-app/package-lock.json @@ -1,12 +1,12 @@ { "name": "mfer-safe", - "version": "0.1.5", + "version": "0.1.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mfer-safe", - "version": "0.1.5", + "version": "0.1.6", "dependencies": { "@emotion/react": "^11.9.3", "@emotion/styled": "^11.9.3", diff --git a/mfer-safe-desktop-app/package.json b/mfer-safe-desktop-app/package.json index cf4b416..dad8a40 100644 --- a/mfer-safe-desktop-app/package.json +++ b/mfer-safe-desktop-app/package.json @@ -1,6 +1,6 @@ { "name": "mfer-safe", - "version": "0.1.5", + "version": "0.1.6", "private": true, "dependencies": { "@emotion/react": "^11.9.3", diff --git a/mfer-safe-desktop-app/src-tauri/tauri.conf.json b/mfer-safe-desktop-app/src-tauri/tauri.conf.json index 4065a57..53cef09 100644 --- a/mfer-safe-desktop-app/src-tauri/tauri.conf.json +++ b/mfer-safe-desktop-app/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "MferSafe", - "version": "0.1.5" + "version": "0.1.6" }, "tauri": { "allowlist": {