Hi everyone i could not get balance and send transaction in Metamask Android native sdk

  1. I trying to send 0.001 eth in sepolia network but after connecting MetaMask the transaction amount will be 0 eth.

  1. And i could not get balance in EthereumMethod.ETH_GET_BALANCE.value

Hi are you sure you have some Sepolia, please address in Support - MetaMask
Could you share the steps how are you trying to use this method: EthereumMethod.ETH_GET_BALANCE.value and what error do you see. Thanks

i could’nt get any errors in balance request

I’m sorry what exactly do you see, and could you share the steps pls

Ok i will share.

var balance: String? = null

    val params: List<String> = listOf(ethereumViewModel.selectedAddress, "latest")

    val getBalanceRequest = EthereumRequest("",
        EthereumMethod.ETH_GET_BALANCE.value, params)

    ethereumViewModel.sendRequest(getBalanceRequest) { result ->
        Log.d("TAG", "getBalance1: "+result)
        if (result is RequestError) {
            runOnUiThread {
                balance = result.toString()
                Log.d("TAG", "getBalance2: "+balance)
        } else {
            runOnUiThread {
                balance = result.toString()
                Log.d("TAG", "getBalance3: "+balance)

@Sundar could you please open an issue here: Issues · MetaMask/metamask-android-sdk · GitHub

okay 0xroosh thank you.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.