Im trying create a webapp its works fine on chrome nothing wrong,but it show invaild amout on mobile

Im trying create a webapp its works fine on chrome nothing wrong,but it show invaild amout on mobile with metamask.

2 Likes

Hey @xSeanz, welcome to the MetaMask community! :fox_face:

Can you explain the steps you are doing to get to this error?

1 Like

const value_ether = document.getElementById(“amount”).value.toString()

async function sendToken(abi, contract, fromaddress, toaddress, value_ether) {

const Web3 = window.Web3;

const ct = await createContractOBJ(abi, contract)

try {

    const receipt = await ct.methods.transfer(toaddress, Web3.utils.toWei(value_ether, "ether")).send({ 'from': fromaddress }).on('receipt', (receipt) => { })

    console.log(receipt)

    const result = {}

    // console.log(receipt)

    result["receipt"] = modify_receipt(receipt);

    localStorage.setItem("last_transaction", result)

    // console.log(result)

    return result

} catch (error) {

    console.log(error);

    hideLoading()

    $(window).unbind('beforeunload')

    document.getElementById('btn-withdraw').disabled = false

    return null

}

}

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