-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the set_subscribe_callback boolean an input paramater with defau…
…lt true
- Loading branch information
Showing
3 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import {Apis} from "bitsharesjs-ws"; | ||
import {ChainStore} from "../lib"; | ||
|
||
Apis.instance("wss://bitshares.openledger.info/ws", true).init_promise.then((res) => { | ||
Apis.instance("wss://eu.nodes.bitshares.ws", true).init_promise.then(res => { | ||
console.log("connected to:", res[0].network); | ||
ChainStore.init().then(() => { | ||
ChainStore.init(false).then(() => { | ||
ChainStore.subscribe(updateState); | ||
}); | ||
}); | ||
|
||
let dynamicGlobal = null; | ||
function updateState(object) { | ||
dynamicGlobal = ChainStore.getObject("2.1.0"); | ||
// dynamicGlobal = ChainStore.getObject("2.1.0"); | ||
|
||
console.log("ChainStore object update\n", dynamicGlobal ? dynamicGlobal.toJS() : dynamicGlobal); | ||
console.log("ChainStore object update"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters