From c0779776c04d9f713dac7c56460dbe435f9a7ac8 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Mon, 10 Aug 2015 22:25:13 -0300 Subject: [PATCH] check for bw*- as client id --- lib/server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/server.js b/lib/server.js index 0bb93b4..90bd598 100644 --- a/lib/server.js +++ b/lib/server.js @@ -1046,7 +1046,7 @@ WalletService.prototype.createTx = function(opts, cb) { excludeUnconfirmedUtxos: !!opts.excludeUnconfirmedUtxos, }); - if (!self.clientVersion || _.startsWith(self.clientVersion, 'bwc-0.0.')) { + if (!self.clientVersion || /^bw.-0\.0\./.test(self.clientVersion)) { txp.version = '1.0.1'; } @@ -1366,7 +1366,7 @@ WalletService.prototype.getPendingTxs = function(opts, cb) { self.storage.fetchPendingTxs(self.walletId, function(err, txps) { if (err) return cb(err); - if (_.startsWith(self.clientVersion, 'bwc-0.0.')) { + if (!self.clientVersion || /^bw.-0\.0\./.test(self.clientVersion)) { var allLegacy = _.all(txps, function(txp) { return _.startsWith(txp.version, '1.'); });