Nik
Nik

Reputation: 29

Unable to get response from the library

I try to execute this code and receive current blockchain block number

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

I did not forget to import the library

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

This code is executed correctly.

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));
    }
});

I'm using below library

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

Upvotes: 1

Views: 74

Answers (1)

Nik
Nik

Reputation: 29

I find an answer) I forgot to re-build my React app. Sorry.

Upvotes: 0

Related Questions