Merge pull request #318 from isocolsky/fix/legacy_check
Fix client id check
This commit is contained in:
commit
2a7e0659c7
|
@ -1046,7 +1046,7 @@ WalletService.prototype.createTx = function(opts, cb) {
|
||||||
excludeUnconfirmedUtxos: !!opts.excludeUnconfirmedUtxos,
|
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';
|
txp.version = '1.0.1';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1366,7 +1366,7 @@ WalletService.prototype.getPendingTxs = function(opts, cb) {
|
||||||
self.storage.fetchPendingTxs(self.walletId, function(err, txps) {
|
self.storage.fetchPendingTxs(self.walletId, function(err, txps) {
|
||||||
if (err) return cb(err);
|
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) {
|
var allLegacy = _.all(txps, function(txp) {
|
||||||
return _.startsWith(txp.version, '1.');
|
return _.startsWith(txp.version, '1.');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue