From ffb0087c3e77d2f2a17afe465b0d4da1f1903c2a Mon Sep 17 00:00:00 2001 From: Matt Solomon Date: Fri, 3 Nov 2023 07:54:31 -0400 Subject: [PATCH 1/3] feat: add Zora mainnet support --- src/components/ExplorerApiEndpoints.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/ExplorerApiEndpoints.json b/src/components/ExplorerApiEndpoints.json index 76e66f9..51803e0 100755 --- a/src/components/ExplorerApiEndpoints.json +++ b/src/components/ExplorerApiEndpoints.json @@ -1035,6 +1035,10 @@ "chainId": 7668378, "url": "https://testnet.qom.one" }, + { + "chainId": 7777777, + "url": "https://explorer.zora.energy" + }, { "chainId": 8794598, "url": "https://blockscout.hap.land" From fe5c5ebeaa1eadaaa229970fa4f2ac6a8e85c0f3 Mon Sep 17 00:00:00 2001 From: Matt Solomon Date: Fri, 9 Feb 2024 13:44:03 -0800 Subject: [PATCH 2/3] chore: remove settings.json --- .vscode/settings.json | 3 --- 1 file changed, 3 deletions(-) delete mode 100755 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100755 index 23fd35f..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "editor.formatOnSave": true -} \ No newline at end of file From ef832f1dc45d48c3ef44a203abbfccb3d6b451a8 Mon Sep 17 00:00:00 2001 From: Matt Solomon Date: Fri, 9 Feb 2024 13:44:37 -0800 Subject: [PATCH 3/3] style: fix letter/line spacing, filter out comments to simplify diff --- src/components/FileDiff.js | 40 +++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/src/components/FileDiff.js b/src/components/FileDiff.js index 366313b..f9df84c 100755 --- a/src/components/FileDiff.js +++ b/src/components/FileDiff.js @@ -88,10 +88,36 @@ const HideIfCollapsed = styled.div` `; const customStyles = { - codeFold: { - padding: "0px", - margin: "0px", + // diffContainer: { padding: '0px', margin: '0px' }, + diffRemoved: { + 'padding-top': '0px', + 'padding-bottom': '0px', + 'margin-top': '0px', + 'margin-bottom': '0px', }, + diffAdded: { + 'padding-top': '0px', + 'padding-bottom': '0px', + 'margin-top': '0px', + 'margin-bottom': '0px', + }, + // marker: { padding: '0px', margin: '0px' }, + // emptyGutter: { padding: '0px', margin: '0px' }, + highlightedLine: { padding: '0px', margin: '0px' }, + // lineNumber: { padding: '0px', margin: '0px' }, + // highlightedGutter: { padding: '0px', margin: '0px' }, + // contentText: { padding: '0px', margin: '0px' }, + // gutter: { padding: '0px', margin: '0px' }, + // line: { padding: '0px', margin: '0px' }, + wordDiff: { padding: '0px', margin: '0px' }, + wordAdded: { padding: '0px', margin: '0px' }, + wordRemoved: { padding: '0px', margin: '0px' }, + // codeFoldGutter: { padding: '0px', margin: '0px' }, + codeFold: { padding: '0px', margin: '0px' }, + // emptyLine: { padding: '0px', margin: '0px' }, + // content: { padding: '0px', margin: '0px' }, + // titleBlock: { padding: '0px', margin: '0px' }, + // splitView: { padding: '0px', margin: '0px' }, }; const codeFoldMessageRenderer = (str) => { @@ -119,6 +145,10 @@ const copy = (text) => { navigator.clipboard.writeText(text); }; +// Remove all comments and reduce 2+ new lines to 1 new line +const removeCommentsAndExtraLines = str => str.replace(/^\s*\/\/.*$/gm, '').replace(/\/\*[\s\S]*?\*\//gm, '').replace(/\n{2,}/g, '\n').trim(); + + export default ({ oldCode, newCode, @@ -270,8 +300,8 @@ export default ({