useDApp icon indicating copy to clipboard operation
useDApp copied to clipboard

Get a balance of my account in Songbird network

Open bytesavvie opened this issue 3 years ago • 15 comments

I am trying to get a wallet balance in Songbird network for my dApp, so I used useEtherBalance hook function to get it.

But it shows me "undefined". Is there any way to solve this?

bytesavvie avatar Jul 22 '22 19:07 bytesavvie

@0xHir0 We're could use a little more details. Can you show your usedapp config? (redacting any secret tokens)

rzadp avatar Jul 25 '22 07:07 rzadp

Though my wallet is not connected to the website, I have to get value from read functions of the smart contract, but now it's impossible. How can I solve the issue?

bytesavvie avatar Oct 12 '22 08:10 bytesavvie

Can't I use @usedapp/[email protected] on Songbird network?

bytesavvie avatar Oct 12 '22 08:10 bytesavvie

Hi, can you please check if it works on current dev version of useDApp: @usedapp/[email protected]?

jakvbs avatar Oct 12 '22 10:10 jakvbs

Let me check

bytesavvie avatar Oct 12 '22 11:10 bytesavvie

Still doesn't work.

bytesavvie avatar Oct 12 '22 12:10 bytesavvie

Can you send your app config and failing code fragment?

jakvbs avatar Oct 12 '22 12:10 jakvbs

Can we have a chat on discord?

bytesavvie avatar Oct 12 '22 12:10 bytesavvie

Sure, my nickname: kvba

jakvbs avatar Oct 12 '22 13:10 jakvbs

This is the config variable.

const config = {
  readOnlyChainId: Songbird.chainId,
  multicallAddresses: {
    19: '0x60351436cf80A31EA6C3B261C784d3C127dBD6f1',
    14: ''
  },
};

bytesavvie avatar Oct 13 '22 01:10 bytesavvie

image

bytesavvie avatar Oct 13 '22 01:10 bytesavvie

I can't find you on discord.

bytesavvie avatar Oct 13 '22 02:10 bytesavvie

I sent you a message yestarday, please check if you received it

jakvbs avatar Oct 13 '22 08:10 jakvbs

This is the config variable.

const config = {
  readOnlyChainId: Songbird.chainId,
  multicallAddresses: {
    19: '0x60351436cf80A31EA6C3B261C784d3C127dBD6f1',
    14: ''
  },
};

Please check this config with latest dev version of useDApp:

const config = {
  readOnlyChainId: Songbird.chainId,
  readOnlyUrls: {
    [Songbird.chainId]: 'https://songbird.towolabs.com/rpc',
  }
}

jakvbs avatar Oct 13 '22 08:10 jakvbs

Thanks very much. It works well.

bytesavvie avatar Oct 13 '22 09:10 bytesavvie