0.1.18 • Published 3 years ago

@nevenhsu/uni-wallet-connect v0.1.18

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
3 years ago

Uni-wallet-connect

A library extracted from the Uniswap v3 codebase and rewritten for reusability. It uses @web-react and ethers.js. NextJS is supported by default.

Demo

How to use

See next example for complete details.

npm install uni-wallet-connect
# or
yarn add uni-wallet-connect

pages/_app.tsx

import '@reach/dialog/styles.css'
import 'inter-ui/inter.css'
import '../styles/globals.css'
import type { AppProps } from 'next/app'
import dynamic from 'next/dynamic'
import React, { StrictMode } from 'react'

const Wrapper = dynamic(() => import('../components/Wrapper'), {
  ssr: false,
})

function MyApp({ Component, pageProps }: AppProps) {
  return (
    <StrictMode>
      <Wrapper>
        <Component {...pageProps} />
      </Wrapper>
    </StrictMode>
  )
}

export default MyApp

components/Wrapper.tsx

import React from 'react'
import { BrowserRouter } from 'react-router-dom'
import { Provider } from 'react-redux'
import Uniswap, { ThemeProvider, makeStore } from '@nevenhsu/uni-wallet-connect'

const store = makeStore()

export default function Wrapper({ children }: React.PropsWithChildren<{}>) {
  return (
    <Provider store={store}>
      <ThemeProvider>
        <BrowserRouter>
          <Uniswap>{children}</Uniswap>
        </BrowserRouter>
      </ThemeProvider>
    </Provider>
  )
}

.env

NEXT_PUBLIC_INFURA_KEY=xxxxxyyyyyzzzzz
NEXT_PUBLIC_APP_NAME=uni-wallet
NEXT_PUBLIC_LOGO_URL=http://localhost:3000/icon.png
0.1.18-beta.1

3 years ago

0.1.18-beta.0

3 years ago

0.1.18

3 years ago

0.1.17

3 years ago

0.1.17-beta.0

3 years ago

0.1.16

3 years ago

0.1.15-beta.2

3 years ago

0.1.15-beta.1

3 years ago

0.1.15-beta.0

3 years ago

0.1.15

3 years ago

0.1.1-4.beta-3

3 years ago

0.1.1-4.beta-2

3 years ago

0.1.14

3 years ago

0.1.14-beta.1

3 years ago

0.1.14-beta.0

3 years ago

0.1.12

3 years ago

0.1.11

3 years ago

0.1.11-beta.1

3 years ago

0.1.11-beta.0

3 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4-beta.2

3 years ago

0.1.4-beta.1

3 years ago

0.1.4-beta.0

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago