MeshJS / mesh

An open-source library to advance Web3 development on Cardano

Home Page:https://meshjs.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

App Wallet Not Grabbing All available UTxOs

shan501 opened this issue · comments

commented

I am setting up a function in my node.js backend to send ada pragmatically to my users.
This is how my wallet instance is setup. I am on mainnet btw.

const MNEMONIC = process.env.SEEDPHRASE;
const blockchainProvider = new Mesh.BlockfrostProvider(
  process.env.BLOCKFROST_PROJECT_ID
);

const wallet = new Mesh.AppWallet({
  networkId: 1,
  fetcher: blockchainProvider,
  submitter: blockchainProvider,
  key: {
    type: 'mnemonic',
    words: MNEMONIC.split(' '),
  },
});

There is ada in that address but when i try to getAll available UTxOs it returns a blank array. When i try to submit a simple transfer event returns an error saying there is not enought UTxOs to cover the transaction.

I am not sure if this has anything to do with it , but when i do

console.log(wallet)

the protocol params that it returns is wrong. It has an epoch of just 0, all the parameters are wrong, and when i try switching to a different network, the protocol params stayed the same.

can you please explain how are you sending funds to the wallet?
maybe you are sending funds to the wrong address