使用 web3.eth.getAccounts 和 eth_requestAccounts 时,相同的地址看起来大写和小写
我在 dapp 中使用 Metamask 作为 ethereum
提供程序
当我调用 web3.eth.getAccounts()
时,
它返回 0xaBCd12baabcd7be123B6123DabCD484321ABcd3
当我发送 ethereum.send("eth_requestAccounts")
它返回相同的地址,但是基于一些奇怪的逻辑0xabcD12BAAbcd7BE123b6123Dabcd484321abCD3
,字符是小写或大写。
除此之外,地址没有其他变化,没有数字丢失,顺序也正确。
为什么会发生这种事?
I'm using Metamask as ethereum
provider in dapp
When I'm calling web3.eth.getAccounts()
It returns 0xaBCd12baabcd7be123B6123DabCD484321ABcd3
When i'm sending ethereum.send("eth_requestAccounts")
It returns same address but chars are lower cased or capitalized based on some weird logic 0xabcD12BAAbcd7BE123b6123Dabcd484321abCD3
.
There's no other change to the address rather than that, no digit is missing and order is correct.
Why wuold that be happening?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论