首页 > 解决方案 > 无法从图书馆获得响应

问题描述

我尝试执行此代码并接收当前的区块链块号

nodeInteraction.currentHeight('https://nodes.wavesplatform.com/').then((res) => {
  console.log(res);
});

我没有忘记导入库

import { invokeScript, broadcast, nodeInteraction, waitForTx } from '@waves/waves-transactions';

此代码已正确执行。

nodeInteraction.accountData(dappaddress, baseUri).then((v) => {
    window.dAppData = v;
    if (v) {
        window.dAppDataKeys = Object.keys(v);
        console.log("dApp Account data:");
        console.log(v);
        console.log(JSON.stringify(v));
    }
});

我正在使用下面的库

https://wavesplatform.github.io/waves-transactions/globals.html#currentheight

标签: node.jswavesplatformride

解决方案


我找到了答案)我忘了重新构建我的 React 应用程序。对不起。


推荐阅读