GithubHelp home page GithubHelp logo

Comments (10)

itsnyx avatar itsnyx commented on June 17, 2024 1

@ignaciosantise i tested with safe pal and send transaction method actually did work with no probelm !
so the issue is from trust wallet side

from web3modal-react-native.

ignaciosantise avatar ignaciosantise commented on June 17, 2024 1

@itsnyx yes, lets wait until their next release. Hope it is solved. As it's not an issue with this SDK, im closing this and i'll post updates in #22

from web3modal-react-native.

arslanrazzaq avatar arslanrazzaq commented on June 17, 2024

@itsnyx @arein @chris13524 @0xasimetriq I tried this library in react native cli project, It's working fine if i didn't use the navigation. But throwing error initialization provider with the navigation.

from web3modal-react-native.

ignaciosantise avatar ignaciosantise commented on June 17, 2024

@arslanrazzaq feel free to open a new issue with all the related info, screenshots and and example repo to reproduce the bug.

from web3modal-react-native.

ignaciosantise avatar ignaciosantise commented on June 17, 2024

@itsnyx which wallet are you using?

from web3modal-react-native.

itsnyx avatar itsnyx commented on June 17, 2024

@ignaciosantise i only tested trust wallet both via qr code and also from installed wallets method.

other functions such as signing message or transaction works fine

from web3modal-react-native.

ignaciosantise avatar ignaciosantise commented on June 17, 2024

@itsnyx can you test with another wallet? Trust Wallet has some issues that'll be solved in their next release.

Context: #22

from web3modal-react-native.

dokocat avatar dokocat commented on June 17, 2024

Btw Omni wallet, also don't work on iOS using the React Native project. Trustwallet and Zerion don't work on Android.

from web3modal-react-native.

itsnyx avatar itsnyx commented on June 17, 2024

@ignaciosantise i dont know this information helps or not but before using web3modal i was using this libraries directly inside app:

    "@walletconnect/react-native-compat": "^2.4.0",
    "@walletconnect/universal-provider": "^2.4.0",

and i did dependancy update to the following:

    "@walletconnect/react-native-compat": "^2.5.1",
    "@walletconnect/universal-provider": "^2.5.1",

and after this update i could not do any blockchain actions !
it would not show up inside wallet apps!
and after this i downgraded to the old versions and started working
if you are using these libraries inside web3 modal library , maybe this is the issue !

from web3modal-react-native.

itsnyx avatar itsnyx commented on June 17, 2024

hello, @ignaciosantise .
i found a solution for sending transaction in trust wallet in its current state :

export const handleSendTransaction = async (
  amount,
  destination,
  setWaiting,
  web3Provider,
) => {
  try {
    if (!web3Provider) {
      Toast.show({
        type: 'info',
        text1: t('main:connect_wallet'),
        text2: t('main:connect_wallet_info'),
      });
      return;
    }
    const {chainId} = await web3Provider.getNetwork();
    const [address] = await web3Provider.listAccounts();
    const balance = await web3Provider.getBalance(address);
    const tx = await formatTestTransaction(
      'eip155:' +
        chainId +
        ':' +
        address +
        ':' +
        destination +
        ':' +
        Web3.utils.numberToHex(Web3.utils.toWei(amount, 'ether')),
    );

    if (balance.lt(BigNumber.from(tx.gasPrice).mul(tx.gasLimit))) {
      Toast.show({
        type: 'error',
        text1: t('main:insufficient_balance'),
        text2: t('main:insufficient_balance_info'),
      });
      return {
        method: 'eth_sendTransaction',
        address,
        valid: false,
        result: 'Insufficient funds for intrinsic transaction cost',
      };
    }
    Toast.show({
      type: 'info',
      text1: t('main:confirm_purchase'),
      text2: t('main:confirm_purchase_info'),
    });
    setWaiting(true);
    const txHash = await web3Provider.send('eth_sendTransaction', [tx]);
    return {
      method: 'eth_sendTransaction',
      address,
      valid: true,
      result: txHash,
    };
  } catch (err) {
    console.log('err', err);
  }
};

this method works with trust 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.