You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 19, 2023. It is now read-only.
> This is a [React](https://reactjs.org/) library written in [Typescript](https://www.typescriptlang.org/) and based on [Material-UI](https://material-ui.com/). It exposes common components, services and assets to be re used in RIF projects.
**Warning: This project is in alpha state. There might (and most probably will) be changes in the future to its working. Also, no guarantees can be made about its stability, efficiency, and security at this stage.**
15
20
@@ -56,7 +61,7 @@ import { BrowserRouter } from 'react-router-dom'
56
61
const App = () => (
57
62
<ThemeProvidertheme={theme}>
58
63
<BrowserRouter>
59
-
<Header/>
64
+
<Header/>
60
65
<PageTemplate>
61
66
<Typographycolor='primary'>Hello world :)</Typography>
62
67
</PageTemplate>
@@ -65,6 +70,23 @@ const App = () => (
65
70
)
66
71
```
67
72
73
+
### Web3Provider
74
+
On the Web3Provider you can set the property `requiredNetworkId` and the actions `onConnectedAccountChange`, `onConnectedNetworkChange` that will get triggered once the user wallet is connected and there is a change on the account or network.
If you want to try this library without creating a new project you can clone this repo and follow the next steps:
@@ -83,6 +105,21 @@ cd example/ && npm start
83
105
84
106
3. (Optional) Import the components, assets or services that you want in the `example/src/App.js` file following the [Usage](#usage) section to see them in action.
85
107
108
+
## Testing
109
+
110
+
To run unit test and build the library, you can use
111
+
```
112
+
npm run test
113
+
```
114
+
115
+
If you only want to run the unit test, you can use
- Thanks to [EVM Networks](https://github.com/ethereum-lists/chains) for providing the data source of network objects as a JSON, which inspired us to create the `NetworkInfo` interface
0 commit comments