Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

166
Vistas
Conflicting dependency functions and declarations

I am using @loopring/web3-providers and @next-auth/react in a nextjs application

I am using a modified version of the Loopring Web 3 provider demo from https://codesandbox.io/s/react-4v50ft

I have relocated the loopring web3 stuff from /src in the root folder to /components/web3 in my next app

I have imported this into the header component, imported that into my _app, everything seems to work great. I am able to use the web3 providers, and I get succesful logs in the console with accurate information, everything seems to be ok.

I am also using next-auth, with pretty much their exact spec for implementation https://next-auth.js.org/

I set up my next app to simply extend the code examples provided on their home page. I am only using the discord provider, discord is configured well, I am able to connect, and I can make use of the "session" object which provides the discord account deets.

From providers.tsx in /components/web3:


import { useConnect } from "./useConnect";
import { walletServices, connectProvides } from "@loopring-web/web3-provider";
import { useSession, signIn, signOut } from "next-auth/react";

export default function Web3Providers() {
  useConnect();
  const { data: web3session } = useSession();

...

From /index


import Image from "next/image";
import styles from "../styles/Home.module.css";
import { useSession, signIn, signOut } from "next-auth/react";
import Head from "next/head";
import OfficialCollections from "./collections/officialCollections";

export default function Home() {
  const { data: session } = useSession();

...

So, originally, Loopring's declaration was { data: session } same as next-auth. I altered loopring to use data: web3session just so that I could differentiate.

But I am somewhat confused about how to properly export this web3session from proviers.tsx

I am terribly unfamiliar with typescript, but this project has certainly made me start to get a feel for it.

My goal here is to be able to check on a later page that both sessions are active.

I'm also wondering what if any complications I'm likely to run into from there being two separate useSession() coming from different dependencies (this doesn't seem to be causing any issues as of yet)

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda