Merge branch 'isSyncing' of github.com:ethereum/web3.js into isSyncing

This commit is contained in:
Fabian Vogelsteller 2015-09-15 10:53:32 +02:00
commit 194bc86ee0
6 changed files with 135 additions and 12 deletions

8
dist/web3-light.js vendored
View File

@ -5846,9 +5846,13 @@ RequestManager.prototype.stopPolling = function (pollId) {
*/ */
RequestManager.prototype.reset = function () { RequestManager.prototype.reset = function () {
for (var key in this.polls) { for (var key in this.polls) {
this.polls[key].uninstall(); // remove all polls, except sync polls,
// they need to be removed manually by calling syncing.stopWatching()
if(key.indexOf('syncPoll_') === -1) {
this.polls[key].uninstall();
delete this.polls[key];
}
} }
this.polls = {};
if (this.timeout) { if (this.timeout) {
clearTimeout(this.timeout); clearTimeout(this.timeout);

File diff suppressed because one or more lines are too long

8
dist/web3.js vendored
View File

@ -5846,9 +5846,13 @@ RequestManager.prototype.stopPolling = function (pollId) {
*/ */
RequestManager.prototype.reset = function () { RequestManager.prototype.reset = function () {
for (var key in this.polls) { for (var key in this.polls) {
this.polls[key].uninstall(); // remove all polls, except sync polls,
// they need to be removed manually by calling syncing.stopWatching()
if(key.indexOf('syncPoll_') === -1) {
this.polls[key].uninstall();
delete this.polls[key];
}
} }
this.polls = {};
if (this.timeout) { if (this.timeout) {
clearTimeout(this.timeout); clearTimeout(this.timeout);

117
dist/web3.js.map vendored Normal file

File diff suppressed because one or more lines are too long

5
dist/web3.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -380,7 +380,7 @@ var toTwosComplement = function (number) {
* @return {Boolean} * @return {Boolean}
*/ */
var isStrictAddress = function (address) { var isStrictAddress = function (address) {
return /^0x[0-9a-f]{40}$/.test(address); return /^0x[0-9a-f]{40}$/i.test(address);
}; };
/** /**
@ -391,7 +391,7 @@ var isStrictAddress = function (address) {
* @return {Boolean} * @return {Boolean}
*/ */
var isAddress = function (address) { var isAddress = function (address) {
return /^(0x)?[0-9a-f]{40}$/.test(address); return /^(0x)?[0-9a-f]{40}$/i.test(address);
}; };
/** /**