Skip to content

Commit

Permalink
Merge pull request #283 from lidofinance/develop
Browse files Browse the repository at this point in the history
Develop to main
  • Loading branch information
itaven authored Mar 14, 2024
2 parents 8371cb7 + 23a6440 commit f93057e
Show file tree
Hide file tree
Showing 35 changed files with 711 additions and 409 deletions.
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,3 @@ WIDGET_API_BASE_PATH_FOR_IPFS=

# Actual for IPFS mode
REWARDS_BACKEND_BASE_PATH=

13 changes: 3 additions & 10 deletions .github/workflows/ci-ipfs-goerli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,9 @@ jobs:
node-version: 20
cache: 'yarn'
- name: Set tag, commit and branch name
id: tag
run: |
export TAG=`echo $(git describe --abbrev=0 --tags)`
export TAG_COMMIT_SHA=$(git rev-parse --short $(git rev-list -n 1 $TAG))
echo "TAG=$TAG" >> $GITHUB_OUTPUT
echo "TAG_COMMIT_SHA=$TAG_COMMIT_SHA" >> "$GITHUB_OUTPUT"
echo '{ "branch": "'$BRANCH_NAME'", "commit": "'$TAG_COMMIT_SHA'", "version": "'$TAG'" }' > ./build-info.json
export BUILD_INFO=$(cat ./build-info.json)
echo "$BUILD_INFO" >> $GITHUB_STEP_SUMMARY
env:
id: build-info
uses: lidofinance/actions/.github/actions/build-info@main
with:
BRANCH_NAME: ${{ github.ref_name }}
- name: Install dependencies
run: |
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/ci-ipfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
outputs:
ipfs_folder: ${{ env.ipfs_folder }}
is_create_release: ${{ env.is_create_release }}
tag: ${{ steps.tag.outputs.TAG }}
tag: ${{ steps.build-info.outputs.tag }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -31,16 +31,9 @@ jobs:
cache: 'yarn'
- name: Set tag, commit and branch name
if: env.is_create_release == 'true'
id: tag
run: |
export TAG=`echo $(git describe --abbrev=0 --tags)`
export TAG_COMMIT_SHA=$(git rev-parse --short $(git rev-list -n 1 $TAG))
echo "TAG=$TAG" >> $GITHUB_OUTPUT
echo "TAG_COMMIT_SHA=$TAG_COMMIT_SHA" >> "$GITHUB_OUTPUT"
echo '{ "branch": "'$BRANCH_NAME'", "commit": "'$TAG_COMMIT_SHA'", "version": "'$TAG'" }' > ./build-info.json
export BUILD_INFO=$(cat ./build-info.json)
echo "$BUILD_INFO" >> $GITHUB_STEP_SUMMARY
env:
id: build-info
uses: lidofinance/actions/.github/actions/build-info@main
with:
BRANCH_NAME: ${{ github.ref_name }}
- name: Install dependencies
run: |
Expand Down
6 changes: 4 additions & 2 deletions IPFS.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"__warning__": "For testing purposes only",
"ens": "app.jeday.eth"
"17000": {
"__warning__": "For testing purposes only",
"ens": "app.jeday.eth"
}
}
8 changes: 4 additions & 4 deletions config/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ export const useGetRpcUrlByChainId = () => {

return useCallback(
(chainId: CHAINS) => {
// Needs this condition 'cause in 'providers/web3.tsx' we add `wagmiChains.polygonMumbai` to supportedChains
// so, here chainId = 80001 is arriving which to raises an invariant
// chainId = 1 we need anytime!
// This condition is needed because in 'providers/web3.tsx' we add `wagmiChains.polygonMumbai` to supportedChains as a workaround.
// polygonMumbai (80001) may cause an invariant throwing.
// And we always need Mainnet RPC for some requests, e.g. ETH to USD price, ENS lookup.
if (
chainId !== CHAINS.Mainnet &&
!clientConfig.supportedChainIds.includes(chainId)
) {
// Has no effect on functionality. Just a fix.
// Return empty string as stub
// Return empty string as a stub
// (see: 'providers/web3.tsx' --> jsonRpcBatchProvider --> getStaticRpcBatchProvider)
return '';
}
Expand Down
5 changes: 5 additions & 0 deletions features/ipfs/faq-placeholder.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import styled from 'styled-components';

export const FaqPlaceholder = styled.div`
margin-top: 32px;
`;
4 changes: 1 addition & 3 deletions features/ipfs/home-page-ipfs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const IPFS_ROUTABLE_PAGES = [
getPathWithoutFirstSlash(SETTINGS_PATH),
];

const HomePageIpfs: FC = () => {
export const HomePageIpfs: FC = () => {
const router = useRouter();
const { asPath } = router;

Expand Down Expand Up @@ -114,5 +114,3 @@ const HomePageIpfs: FC = () => {
// Fix for runtime of `dev-ipfs` (see: package.json scripts)
return <NoSSRWrapper>{spaPage}</NoSSRWrapper>;
};

export default HomePageIpfs;
5 changes: 5 additions & 0 deletions features/ipfs/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export { HomePageIpfs } from './home-page-ipfs';

export { FaqPlaceholder } from './faq-placeholder';
export { SecurityStatusBanner } from './security-status-banner';
export { InsertIpfsBaseScript } from './ipfs-base-script';
1 change: 0 additions & 1 deletion features/ipfs/outdated-hash-banner/index.ts

This file was deleted.

43 changes: 0 additions & 43 deletions features/ipfs/outdated-hash-banner/outdated-hash-banner.tsx

This file was deleted.

103 changes: 0 additions & 103 deletions features/ipfs/outdated-hash-banner/use-ipfs-hash-check.ts

This file was deleted.

1 change: 1 addition & 0 deletions features/ipfs/security-status-banner/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { SecurityStatusBanner } from './security-status-banner';
Loading

0 comments on commit f93057e

Please sign in to comment.