Ethereum React Native Boilerplate Questions

I am also facing the same issue

Please how can I get this boilerplate to work in expo

aha Its looking good might work now that’s set up the comand line tools location in xcode using this that I got from a web search

aha no worries the Quick Start github instructions actually worked for me! Thanks https://youtu.be/9-hF16_6tkk

2 Likes

I was able to fix the issue with this code.

Hi @Jackson ,

We are trying to remove expo integration from the boilerplate as it has a lot of unexpected issues. Please follow the steps laid down in the GitHub description to run the app instead.

@meankasa, adding the code as shown by @cwong should solve the issue.

@justinride, keep up the great work!

@meankasa @cwong Some devices in android are not able to connect with the wallets directly. This has been reported to walletconnect and we are trying to figure out why this happens.

1 Like

I managed to solve this problem on the emulator, but on the real phone it remained

okay sir thank you, i also got issues when running the app on a physical and emulator, the issue is that once finished loading all the 10 account with 1000ETH each, the app never build on my phone

Did you follow the steps that were laid out in the github readme?
Running yarn android does not work.

Try -
Android:

  • Command yarn start
  • Open android folder from source code in Android Studio. Click “Run app” button to open either emulator or physical device. To see if devices are available, run command adb devices in your terminal.
1 Like

I’m facing the same issue in browser I see 404 error.

As mentioned above, it is an issue from Walletconnect and we are looking into it.

Confirmation window not opening in meta mask wallet.
I tried to call a payable contract function. On clicking the button the metamask app is opening, but the confirmation window is not.

Hi,

I’m working on a Dapp to show NFT’s of a given adresse. I have an issue with some NFT images that I cannot display because in the Moralis API json, the image url isn broken. Is there any solution to display those NFT images ?

Thank you in advance.
Hassan.

How can I get data of my tokens? Apparently the only way is creating a function that prints it and calling that function right? I don’t understand how to implement the Moralis.Web3API.native.runContractFunction in React. I tried creating a hook but since the NFT page is already using another hook I can’t use another one.

The best I got was a pending promise with:

code: 141
error: “Web3 API error while calling /:address/function”.

Hi,

Are you looking for React or React Native specific code?

You can do it this way to fetch prices –

import { useMoralisWeb3Api } from "react-moralis";  
const { token } = useMoralisWeb3Api();
const chain = "0x1";
  return token
      .getTokenPrice({ chain, address: tokenAddress })
      .then((result) => result);

Some NFTs do not have the proper image URLs because the metadata isn’t right from the blockchain itself. However, if the info is incorrect from our side, we can double-check it from our side. You can provide the NFT address.

Thanks

React. What I was looking for was to get data on a ERC721 token, by calling a function that prints data. But I don’t get how to implement it inside the NFTBalances component. Either I get “Warning: Can’t perform a React state update on an unmounted component. (…)”, get a rejected promise or just undefined.

It’s working on the Admin panel, but for some reason I can’t implement it on React.

On the meantime, I replaced it with a fetch call using the curl parameters and works fine. Is there any problem on getting it like that (besides the inconvenience)?

async function API() {
  const url = 'https://deep-index.moralis.io/api/v2/<Contract address>/function?chain=bsc%20testnet&function_name=getInfo';
  fetch(url, {
    method: "POST",
    withCredentials: true,
    headers: {
      "accept": "application/json",
      "X-API-Key": <my key>,
      "Content-Type": "application/json"
    },
    body: '{"abi": <my ABI>, "params": <my params>}'
  }).then(response => response.json())
    .then(data => console.log(data));
}```

Hey @iPictorial @Krishna if you add the changes in this pull request you should get past the confirmation model not showing up in MetaMask.

Hey @malik & @gen are there issue with the react native logins not showing up in the Moralis dashboard? I am trying to authentice sessions so I don’t have to login in each time. But the issue is that every time I login via MetaMask, the Session’s table is not populated with the new session for my emulated device. However, when I played around with the Connect to the SDK project, my login for both email and wallet logins show up. Thanks again!