Skip to content
This repository has been archived by the owner on Dec 12, 2018. It is now read-only.

Commit

Permalink
> modified: es6/util/messanger.js
Browse files Browse the repository at this point in the history
>	modified:   lib/util/messanger.js
  • Loading branch information
CapCap_ghostcorn authored and CapCap_ghostcorn committed Aug 28, 2018
1 parent 85f4921 commit f95db10
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions es6/util/messanger.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class Messanger {
console.error(InvalidProvider())
return null
}
console.log(data)
const payload = this.JsonRpc.toPayload(data.method, data.params)
const result = await this.provider.send(payload)
return result
Expand All @@ -22,6 +23,7 @@ class Messanger {
console.error(InvalidProvider())
return null
}
console.log(data)
const payload = this.JsonRpc.toPayload(data.method, data.params)
this.provider.sendAsync(payload, (err, result) => {
if (err) {
Expand Down
8 changes: 5 additions & 3 deletions lib/util/messanger.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,16 @@ var _initialiseProps = function _initialiseProps() {
return _context.abrupt('return', null);

case 3:
console.log(data);
payload = _this.JsonRpc.toPayload(data.method, data.params);
_context.next = 6;
_context.next = 7;
return _this.provider.send(payload);

case 6:
case 7:
result = _context.sent;
return _context.abrupt('return', result);

case 8:
case 9:
case 'end':
return _context.stop();
}
Expand All @@ -78,6 +79,7 @@ var _initialiseProps = function _initialiseProps() {
console.error((0, _errors.InvalidProvider)());
return null;
}
console.log(data);
var payload = _this.JsonRpc.toPayload(data.method, data.params);
_this.provider.sendAsync(payload, function (err, result) {
if (err) {
Expand Down

0 comments on commit f95db10

Please sign in to comment.