Skip to content

Commit

Permalink
support Mainnet in sApp
Browse files Browse the repository at this point in the history
  • Loading branch information
aquiladev committed Apr 8, 2021
1 parent e7fc582 commit b4ecfb8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/GnosisSafeApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,17 @@ const useStyles = makeStyles((theme) => ({
},
}));

const NETWORK_CHAIN_ID = {
MAINNET: 1,
RINKEBY: 4,
};

function GnosisSafeApp() {
const classes = useStyles();

const { sdk, safe } = useSafeAppsSDK();
const web3Provider = useMemo(() => new Web3(new SafeAppProvider(safe, sdk)), [sdk, safe]);
const chainId = NETWORK_CHAIN_ID[safe.network];

return (
<div className={classes.root}>
Expand All @@ -68,7 +74,7 @@ function GnosisSafeApp() {
</Toolbar>
</AppBar>
<Container maxWidth="lg">
<Domains library={web3Provider} account={safe.safeAddress} chainId={4} />
<Domains library={web3Provider} account={safe.safeAddress} chainId={chainId} />
</Container>
</div>
);
Expand Down

0 comments on commit b4ecfb8

Please sign in to comment.