metamask显示“无效金额”。在使用EtherJS传输期间的MetAmask移动应用程序中,但在Web插件中工作正常
使用MetAmask移动应用程序连接到DAPP时,我会遇到无效的量错误。它可以与浏览器插件一起使用,但在移动应用程序上不正常。我正在尝试使用Etherjs转移BUSD。我已经与BUSD合同和ABI联系了,就像我提到的那样,它在网络上正常工作,但在移动应用程序上显示“无效金额”。我真的很感谢您的帮助。
这是我的代码看起来像
const price_r = ethers.utils.parseUnits(price_, 18);
const {BUSDContract, signer} = await getContract();
const contract = BUSDContract.connect(signer)
m_response = await contract.transfer(
'0xf0e2fb4174A66dbD5A4B94B9D6331eA05460542d',
`${amount}`,
{
gasLimit: 3000000,
}
);
MetAmask浏览器插件时一样可行的。但是,当我切换到MetAmask移动应用程序时,它显示了无效金额,如下所示。
I am getting an invalid amount error while connecting to my dapp using the metamask mobile appilication. It works fine with the browser plugin but not on the mobile app. I am trying to transfer BUSD using etherJs. I already connected with the BUSD contract and abi, and like I mentioned it works fine on web but shows "invalid amount" on mobile app. I'd really appreciate the help.
Here's what my code looks like
const price_r = ethers.utils.parseUnits(price_, 18);
const {BUSDContract, signer} = await getContract();
const contract = BUSDContract.connect(signer)
m_response = await contract.transfer(
'0xf0e2fb4174A66dbD5A4B94B9D6331eA05460542d',
`${amount}`,
{
gasLimit: 3000000,
}
);
This works quite when with the metamask browser plugin. However, when I switch to the metamask mobile app it shows the invalid amount as shown below.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
添加气候和加油站:
Add gasLimit and gasPrice:
以防万一任何人介入这个问题,我就可以通过从Etherjs转换为Web3来解决它。
Just in case anyone comes into this issue, I was able to resolve it by switching from etherjs to web3.