forked from AztecProtocol/aztec-connect-explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* crude explorer example for Beno * fixed 2/3 of the barretenberg.js reference * Update network_router.tsx * Update context.ts * Update index.tsx * Update index.tsx * Update block_list.tsx * Update index.tsx * corrections + remove bb from explorer * update sdk block types * build sdk in explorer dockerfile * Used DecodedBlock type * add barretenberg back to explorer --------- Co-authored-by: spypsy <spypsy@outlook.com> Co-authored-by: PhilWindle <philip.windle@gmail.com>
- Loading branch information
1 parent
a6e0b51
commit 084bfda
Showing
9 changed files
with
63 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
import React from 'react'; | ||
import { BrowserRouter } from 'react-router-dom'; | ||
import { CachePolicies, Provider as FetchProvider } from 'use-http'; | ||
import { ServerRollupProvider } from '@aztec/sdk'; | ||
|
||
import { App } from './app.js'; | ||
import { Network } from './config.js'; | ||
import { NetworkContext } from './context.js'; | ||
import { NetworkContext, RollupProviderContext } from './context.js'; | ||
|
||
export const NetworkRouter: React.FunctionComponent<{ network: Network }> = props => { | ||
const { baseUrl, endpoint } = props.network; | ||
|
||
const rollupProvider = new ServerRollupProvider(new URL(endpoint)); | ||
|
||
return ( | ||
<NetworkContext.Provider value={props.network}> | ||
<FetchProvider url={endpoint} options={{ cachePolicy: CachePolicies.CACHE_AND_NETWORK }}> | ||
<BrowserRouter basename={baseUrl}> | ||
<App /> | ||
</BrowserRouter> | ||
</FetchProvider> | ||
<RollupProviderContext.Provider value={rollupProvider}> | ||
<FetchProvider url={endpoint} options={{ cachePolicy: CachePolicies.CACHE_AND_NETWORK }}> | ||
<BrowserRouter basename={baseUrl}> | ||
<App /> | ||
</BrowserRouter> | ||
</FetchProvider> | ||
</RollupProviderContext.Provider> | ||
</NetworkContext.Provider> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters