Skip to content

Commit

Permalink
Merge branch 'main' into getTransactionExclusionStatusV1
Browse files Browse the repository at this point in the history
  • Loading branch information
joaniefromtheblock authored Sep 30, 2024
2 parents 4f09e16 + cfea53c commit cf2824a
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ on:
required: true
SENTRY_KEY:
required: true
GF_SURVEY_KEY:
required: true

env:
SEGMENT_ANALYTICS_KEY: ${{ secrets.SEGMENT_ANALYTICS_KEY }}
LD_CLIENT_ID: ${{ secrets.LD_CLIENT_ID }}
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
GF_SURVEY_KEY: ${{ secrets.GF_SURVEY_KEY }}

jobs:
build:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/case.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ on:
required: true
SENTRY_KEY:
required: true
GF_SURVEY_KEY:
required: true

env:
SEGMENT_ANALYTICS_KEY: ${{ secrets.SEGMENT_ANALYTICS_KEY }}
LD_CLIENT_ID: ${{ secrets.LD_CLIENT_ID }}
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
GF_SURVEY_KEY: ${{ secrets.GF_SURVEY_KEY }}

jobs:
case:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ on:
required: true
SENTRY_KEY:
required: true
GF_SURVEY_KEY:
required: true

env:
SEGMENT_ANALYTICS_KEY: ${{ secrets.SEGMENT_ANALYTICS_KEY }}
LD_CLIENT_ID: ${{ secrets.LD_CLIENT_ID }}
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
GF_SURVEY_KEY: ${{ secrets.GF_SURVEY_KEY }}

jobs:
lint:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
SEGMENT_ANALYTICS_KEY: ${{ secrets.SEGMENT_ANALYTICS_DEV_KEY }}
LD_CLIENT_ID: ${{ secrets.LD_CLIENT_ID }}
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
GF_SURVEY_KEY: ${{ secrets.GF_SURVEY_KEY }}

lint:
name: Lint
Expand All @@ -34,6 +35,7 @@ jobs:
SEGMENT_ANALYTICS_KEY: ${{ secrets.SEGMENT_ANALYTICS_DEV_KEY }}
LD_CLIENT_ID: ${{ secrets.LD_CLIENT_ID }}
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
GF_SURVEY_KEY: ${{ secrets.GF_SURVEY_KEY }}

case:
name: Case
Expand All @@ -42,6 +44,7 @@ jobs:
SEGMENT_ANALYTICS_KEY: ${{ secrets.SEGMENT_ANALYTICS_DEV_KEY }}
LD_CLIENT_ID: ${{ secrets.LD_CLIENT_ID }}
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
GF_SURVEY_KEY: ${{ secrets.GF_SURVEY_KEY }}

all-jobs-completed:
name: All jobs completed
Expand Down
1 change: 1 addition & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const config = {
VERCEL_ENV: process.env.VERCEL_ENV,
DASHBOARD_PREVIEW_URL: process.env.DASHBOARD_PREVIEW_URL,
SENTRY_KEY: process.env.SENTRY_KEY,
GF_SURVEY_KEY: process.env.GF_SURVEY_KEY,
},

trailingSlash: true,
Expand Down
48 changes: 45 additions & 3 deletions src/components/ParserOpenRPC/DetailsBox/MDContent.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,51 @@
import React from "react";

const parseLists = (content: string) => {
const lines = content.split('\n');
let result = '';
let isFirstLevelOpen = false;
let isSecondLevelOpen = false;
lines.forEach((line) => {
if (line.match(/^ {2}-\s+/)) {
if (!isSecondLevelOpen) {
result += '<ul>';
isSecondLevelOpen = true;
}
result += `<li>${line.trim().substring(4)}</li>`;
} else if (line.match(/^ -\s+/)) {
if (isSecondLevelOpen) {
result += '</ul>';
isSecondLevelOpen = false;
}
if (!isFirstLevelOpen) {
result += '<ul>';
isFirstLevelOpen = true;
}
result += `<li>${line.trim().substring(2)}</li>`;
} else {
if (isSecondLevelOpen) {
result += '</ul>';
isSecondLevelOpen = false;
}
if (isFirstLevelOpen) {
result += '</ul>';
isFirstLevelOpen = false;
}
result += line;
}
});
if (isSecondLevelOpen) result += '</ul>';
if (isFirstLevelOpen) result += '</ul>';
return result;
};

const parseMarkdown = (content: string) => {
return content
.replace(/\[(.*?)\]\((.*?)\)/g, '<a href="$2">$1</a>')
.replace(/`(.*?)`/g, "<code>$1</code>");
return parseLists(
content
.replace(/\[(.*?)\]\((.*?)\)/g, '<a href="$2">$1</a>')
.replace(/`(.*?)`/g, '<code>$1</code>')
.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>')
);
};

interface MDContentProps {
Expand Down
4 changes: 4 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ svg {
margin-bottom: -2rem;
}

.usabilla_live_button_container {
display: none !important;
}

.getfeedback-hidden {
display: none !important;
}
Expand Down
6 changes: 6 additions & 0 deletions src/theme/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import React, {
import { Provider as AlertProvider } from "react-alert";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import BrowserOnly from "@docusaurus/BrowserOnly";
import siteConfig from "@generated/docusaurus.config";
import { AlertTemplate, options } from "@site/src/components/Alert";
import { MetaMaskSDK, SDKProvider } from "@metamask/sdk";
import {
Expand Down Expand Up @@ -129,9 +130,14 @@ export const LoginProvider = ({ children }) => {
} catch (e) {}
};

const { GF_SURVEY_KEY } = siteConfig.customFields;

useEffect(() => {
const provider = sdk?.getProvider();
setMetaMaskProvider(provider);
if ((window as any)?.usabilla && window?.innerWidth > 1720) {
(window as any)?.usabilla?.load("w.usabilla.com", GF_SURVEY_KEY);
}
}, []);

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion wallet/reference/new-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ import { NETWORK_NAMES } from "@site/src/plugins/plugin-json-rpc"

<ParserOpenRPC
network={NETWORK_NAMES.linea}
method="eth_blockNumber"
method="eth_sendRawTransaction"
/>

0 comments on commit cf2824a

Please sign in to comment.