GithubHelp home page GithubHelp logo

Comments (6)

ignaciosantise avatar ignaciosantise commented on June 9, 2024 1

@alsakhaev we released a new alpha version that reuses the existing session automatically 💪 Closing the issue.

from web3modal-react-native.

ignaciosantise avatar ignaciosantise commented on June 9, 2024

Hey @alsakhaev, we've just created a PR to reuse the existing session. After that merge, the session will load automatically

from web3modal-react-native.

taibenvenuti avatar taibenvenuti commented on June 9, 2024

This still doesn't work for me.
provider is undefined until the open function is called.

from web3modal-react-native.

ignaciosantise avatar ignaciosantise commented on June 9, 2024

Hey @taibenvenuti 👋 are you using the last version of the SDK? Can you upload the piece of code where you render the Web3Modal component?

from web3modal-react-native.

taibenvenuti avatar taibenvenuti commented on June 9, 2024

Yes I updated to alpha3

import './expo-crypto-shim.js';
import '@walletconnect/react-native-compat';
import '@ethersproject/shims';
import { ThemeProvider } from './src/styles/ThemeContext';
import { Navigation } from './src/navigation/Navigation';
import { Provider } from 'react-redux';
import { persistor, store } from './src/store/store';
import { PersistGate } from 'redux-persist/integration/react';
import { AuthenticationProvider } from './src/services/AuthenticationContext';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { Web3Modal } from '@web3modal/react-native';
import { PROJECT_ID } from '@env';
import { AssetsProvider } from './src/services/AssetsContext';
import { providerMetadata } from './src/Config';

export default function App() {
  return (
    <Provider store={store}>
      <Web3Modal projectId={PROJECT_ID} providerMetadata={providerMetadata} />
      <PersistGate loading={null} persistor={persistor}>
        <ThemeProvider>
          <AuthenticationProvider>
            <AssetsProvider>
              <SafeAreaProvider style={{ margin: 0 }}>
                <Navigation />
              </SafeAreaProvider>
            </AssetsProvider>
          </AuthenticationProvider>
        </ThemeProvider>
      </PersistGate>
    </Provider>
  );
}

from web3modal-react-native.

ignaciosantise avatar ignaciosantise commented on June 9, 2024

@taibenvenuti When <Web3Modal /> renders, it initializes the provider and automatically restores the connection with the wallet (if exists).

If you didn't connect with a wallet before, when you open the modal a new session is created but it wont be saved unless you actually connect with a wallet.

from web3modal-react-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.