node.js - 无法从图书馆获得响应
问题描述
我尝试执行此代码并接收当前的区块链块号
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
解决方案
我找到了答案)我忘了重新构建我的 React 应用程序。对不起。
推荐阅读
- gmail-api - 在 gmail api 身份验证期间出现错误“302”
- flask - flask_socketio 和 React 客户端 - 发送不起作用
- ios - 将 JSON 整数转换为字符串时遇到问题 (Swift 5)
- unity3d - UnityAds 3.4.4 IOS重复
- google-apps-script - 谷歌搜索控制台 API 错误 400 “parseError”
- python - 将张量列表转换为张量的张量 pytorch
- emacs - 如何在 Proof General 中更改 Coq 版本?
- r - 如果 n 出现少于 5 次,则改为 n-1
- mysql - SQLSTATE[HY093]:左连接出现无效的参数号
- linux - 如何从 shell 脚本运行虚拟环境?