Set the network version of fcoin before importing wallet

https://github.com/oipwg/fcoin/blob/master/docs/Examples/fullnode-and-wallet.js#L2
This commit is contained in:
Sky Young 2018-10-04 12:37:34 -06:00
parent b139c33726
commit 02006ed18c
2 changed files with 4 additions and 2 deletions

View File

@ -3,7 +3,6 @@
var index = require('../../');
var log = index.log;
var bcoin = require('fcoin');
const walletPlugin = bcoin.wallet.plugin;
var bzmq = require('bzmq');
var Bcoin = function(options) {
@ -14,6 +13,9 @@ Bcoin.prototype.start = function(callback) {
var self = this;
self._bcoin = bcoin.fullnode(self._config);
bcoin.set(self._config.network || 'main')
const walletPlugin = bcoin.wallet.plugin;
// Make fcoin add the wallet plugin
self._bcoin.use(walletPlugin)
// bzmq allows zmq connections to fcoin

View File

@ -5,7 +5,7 @@
"node": ">=8.0.0"
},
"author": "BitPay <dev@bitpay.com>",
"version": "5.0.0-beta.76",
"version": "5.0.0-beta.77",
"main": "./index.js",
"repository": "git://github.com/oipwg/flocore-node.git",
"homepage": "https://github.com/oipwg/flocore-node",