小编Viv*_*aud的帖子

dApp:Web3.eth.getCoinbase(function(err, account) 不显示我从元掩码连接的 rinkeby 帐户

我有一个 dApp,可以在本地 Ganache 网络上运行,但不能在 Heroku 上部署的 Rinkeby 上运行

我在 App.js 中有这段代码:

// Load account data
    web3.eth.getCoinbase(function(err, account) {
      if (err === null) {
        App.account = account;
        $("#accountAddress").html("Your Account: " + account);
      }
    });
Run Code Online (Sandbox Code Playgroud)

但这就是我得到的:您的帐户:null

这是文件:https://github.com/Louvivien/filmdevelopmentapp/blob/master/src/js/app.js

你知道我能做什么吗?

heroku node.js ethereum web3js

3
推荐指数
1
解决办法
2336
查看次数

标签 统计

ethereum ×1

heroku ×1

node.js ×1

web3js ×1