Skip to content

Instantly share code, notes, and snippets.

@dmihal
Last active January 7, 2020 14:27
Show Gist options
  • Save dmihal/4e5c73f34ade7ddd6065edc2ad72607e to your computer and use it in GitHub Desktop.
Save dmihal/4e5c73f34ade7ddd6065edc2ad72607e to your computer and use it in GitHub Desktop.
Basic Burner Wallet
import React from 'react';
import ReactDOM from 'react-dom';
import { xdai, dai, eth } from '@burner-wallet/assets';
import BurnerCore from '@burner-wallet/core';
import { InjectedSigner, LocalSigner } from '@burner-wallet/core/signers';
import { InfuraGateway, InjectedGateway, XDaiGateway } from '@burner-wallet/core/gateways';
import Exchange, { Uniswap, XDaiBridge } from '@burner-wallet/exchange';
import ModernUI from '@burner-wallet/modern-ui';
const core = new BurnerCore({
signers: [new InjectedSigner(), new LocalSigner()],
gateways: [
new InjectedGateway(),
new InfuraGateway(process.env.REACT_APP_INFURA_KEY),
new XDaiGateway(),
],
assets: [xdai, dai, eth],
});
const exchange = new Exchange({
pairs: [new XDaiBridge(), new Uniswap('dai')],
});
const BurnerWallet = () =>
<ModernUI
title="Basic Wallet"
core={core}
plugins={[exchange]}
/>
ReactDOM.render(<BurnerWallet />, document.getElementById('root'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment