Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nexus Crypto: Stuck #27

Open
charliebrooksman opened this issue Mar 22, 2022 · 0 comments
Open

Nexus Crypto: Stuck #27

charliebrooksman opened this issue Mar 22, 2022 · 0 comments

Comments

@charliebrooksman
Copy link

Braden Pezeshki, [Feb 11, 2022 at 8:13:56 AM (Feb 11, 2022 at 8:15:12 AM)]:
Sorry to bug you @jeanpatricks. I can't seem to recreate the issue you're having. Can you send me the code you're using to instanciate the libraries. And any other web3-react config stuff you can scrape together.

Can you also pipe the version information into a file and send that over.

yarn info > versions.txt

Jp Smith, [Feb 11, 2022 at 8:44:47 AM]:
click handler:

const handleUnstoppable = () => {
setOpen(false)

console.log(process.env.NEXT_PUBLIC_UD_ID)
console.log(process.env.NEXT_PUBLIC_UD_SECRET)

const uauthjs = new UAuth({
  clientID: 'z64DRwre/CeM2TlBc1617X/GOTq6KwBjmdudMxUSqS8=',
  clientSecret: '65Q07mNKlCfa8aqhF4pkZx0+wWZZUBOqoUostbIAJ5Y=',
  redirectUri: 'http://localhost:3000/callback', //process.env.REACT_APP_REDIRECT_URI!,
  // Scope must include openid and wallet
  scope: 'openid wallet',
})

const uauth = new UAuthConnector({
  uauth: uauthjs as any,
  connectors: {
    injected: unstoppableProviders.injected(),
    walletconnect: unstoppableProviders.walletconnect(),
  },
})

activate(uauth)

}

imports from that file:

import UAuth from '@uauth/js'
import { UAuthConnector } from '@uauth/web3-react'
import { unstoppableProviders } from 'modules/ConnectWallet/Connect/lib/getUnstoppableClient'

and the unstoppableProviders file:

// import { UAuthConnector } from '@uauth/web3-react'
import { InjectedConnector } from '@web3-react/injected-connector'
import { WalletConnectConnector } from '@web3-react/walletconnect-connector'
import type { AbstractConnector } from '@web3-react/abstract-connector'
import { getChainConfig, rpcUrls, supportedChainIds } from 'config/chains'
import { BlockChainId } from 'data/BlockChain/domain/BlockChainId'
// import UAuth from '@uauth/js'

// Instanciate your other connectors.
const injected = () => new InjectedConnector({ supportedChainIds })

const walletconnect = () =>
new WalletConnectConnector({
infuraId: 'e338f3d18f6f41a99e0ed203154fc599',
qrcode: true,
})

export const unstoppableProviders: Record<string, () => AbstractConnector> = {
injected,
walletconnect,
}

we're using next v12

node v14.17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant