Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Commit

Permalink
Attempt to fix highlighting by adding space after >
Browse files Browse the repository at this point in the history
  • Loading branch information
Gudahtt committed Mar 27, 2024
1 parent a063b07 commit c75b54e
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,28 @@ Web3 ProviderEngine is a tool for composing your own [web3 providers](https://gi
>
> This package was originally created for MetaMask, but has been replaced by `@metamask/json-rpc-engine`, `@metamask/eth-json-rpc-middleware`, and `@metamask/eth-json-rpc-provider`.
>
>Here is an example of how to create a provider using those packages:
> Here is an example of how to create a provider using those packages:
>
>```typescript
>import { providerFromMiddleware } from '@metamask/eth-json-rpc-provider';
>import { createFetchMiddleware } from '@metamask/eth-json-rpc-middleware';
> ```javascript
> import { providerFromMiddleware } from '@metamask/eth-json-rpc-provider';
> import { createFetchMiddleware } from '@metamask/eth-json-rpc-middleware';
>
>const rpcUrl = '[insert RPC URL here]';
> const rpcUrl = '[insert RPC URL here]';
>
>const fetchMiddleware = createFetchMiddleware({ rpcUrl });
>const provider = providerFromMiddleware(fetchMiddleware);
> const fetchMiddleware = createFetchMiddleware({ rpcUrl });
> const provider = providerFromMiddleware(fetchMiddleware);
>
>provider.sendAsync(
> { id: 1, jsonrpc: '2.0', method: 'eth_chainId' },
> (error, response) => {
> if (error) {
> console.error(error);
> } else {
> console.log(response.result);
> }
> }
>);
>```
> provider.sendAsync(
> { id: 1, jsonrpc: '2.0', method: 'eth_chainId' },
> (error, response) => {
> if (error) {
> console.error(error);
> } else {
> console.log(response.result);
> }
> }
> );
> ```
>
> This example was written with v12.1.0 of `@metamask/eth-json-rpc-middleware` and v3.0.1 of `@metamask/eth-json-rpc-provider`.
>
Expand Down

0 comments on commit c75b54e

Please sign in to comment.