@colony/colony-js-contract-client
Advanced tools
Comparing version 1.13.0 to 1.13.2
@@ -76,6 +76,8 @@ 'use strict'; | ||
// The contract event subscription methods | ||
// Mapping of event topics to ContractEvents | ||
// The contract interface (as provided by the adapter) | ||
// The contract loading query the class was constructed with | ||
// The adapter used to communicate with the blockchain | ||
get: function get() { | ||
@@ -85,9 +87,10 @@ return _ContractMethodCaller2.default; | ||
// Mapping of event topics to ContractEvents | ||
// Show additional logs | ||
// The contract loading query the class was constructed with | ||
// The contract event subscription methods | ||
// The adapter used to communicate with the blockchain | ||
// The contract interface (as provided by the adapter) | ||
}, { | ||
@@ -119,3 +122,4 @@ key: 'Sender', | ||
var adapter = _ref.adapter, | ||
query = _ref.query; | ||
query = _ref.query, | ||
verbose = _ref.verbose; | ||
(0, _classCallCheck3.default)(this, ContractClient); | ||
@@ -127,2 +131,3 @@ this.events = {}; | ||
this._query = Object.assign({}, this.constructor.defaultQuery, query); | ||
this.verbose = verbose; | ||
} | ||
@@ -482,3 +487,4 @@ | ||
// Allow initialising of clients where some events may be missing in the | ||
// ABI, due to changing of events on the contract. | ||
// ABI, due to changing of events on the contract and then log the error | ||
// as a warning if the client is initialized in verbose mode. | ||
try { | ||
@@ -495,3 +501,5 @@ var event = new _ContractEvent2.default({ | ||
} catch (error) { | ||
console.info(error); | ||
if (this.verbose) { | ||
console.warn('WARNING: ' + error.message); | ||
} | ||
} | ||
@@ -498,0 +506,0 @@ } |
@@ -47,3 +47,3 @@ 'use strict'; | ||
if (!this.interface) throw new Error('No such event "' + eventName + '" on this contract'); | ||
if (!this.interface) throw new Error('No such event "' + eventName + '" in loaded ABI'); | ||
@@ -50,0 +50,0 @@ this._wrappedHandlers = new Map(); |
{ | ||
"name": "@colony/colony-js-contract-client", | ||
"version": "1.13.0", | ||
"version": "1.13.2", | ||
"description": "Method-like interface for Smart Contracts", | ||
@@ -75,3 +75,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "24f9488574f0e4c6e9e403cc2fb7818f05728c5b" | ||
"gitHead": "e6a981160e833259d4b5824eaa9facf0e38cd372" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1328324
7623