Comparing version 0.1.10 to 0.1.11
@@ -51,14 +51,2 @@ 'use strict' | ||
this.OnConnect(() => { | ||
const pingBody = new PingBody({ | ||
connectionId: this.id, | ||
peerId: this.peerId | ||
}); | ||
console.log(pingBody); | ||
console.log(pingBody.hasOwnProperty('type')); | ||
console.log(pingBody.hasOwnProperty('Object')); | ||
console.log(pingBody.hasOwnProperty('Stringify')); | ||
console.log(typeof pingBody.Object); | ||
console.log(typeof pingBody.Stringify); | ||
this.channel = this.#peer._channel; | ||
@@ -284,4 +272,3 @@ this.Send(new ConnectionData({ | ||
try { | ||
if(!connectionData.hasOwnProperty('Object') || connectionData.hasOwnProperty('Stringify')) throw `Invalid connectionData`; | ||
if(typeof connectionData.Stringify !== 'function') throw `ConnectionData.Stringify must be a function`; | ||
if(typeof connectionData.Object !== 'function' || typeof connectionData.Stringify !== 'function') throw `Invalid connectionData`; | ||
this.#peer.send(connectionData.Stringify()); | ||
@@ -288,0 +275,0 @@ resolve(); |
@@ -19,3 +19,3 @@ 'use strict' | ||
if(typeof data !== 'object') throw `Invalid data type: ${typeof data}`; | ||
if(!data.hasOwnProperty('type') || !data.hasOwnProperty('Object') || !data.hasOwnProperty('Stringify')) throw `data must be a child of ConnectionDataBodyFactory`; | ||
if(!data.hasOwnProperty('type')) throw `data must be a child of ConnectionDataBodyFactory`; | ||
if(typeof data.Object !== 'function' || typeof data.Stringify !== 'function') throw `data must be a child of ConnectionDataBodyFactory`; | ||
@@ -22,0 +22,0 @@ if(!ConnectionData.#allowed.includes(method)) throw 'Invalid method.'; |
{ | ||
"name": "guardee", | ||
"version": "0.1.10", | ||
"version": "0.1.11", | ||
"description": "Guardee Wallet API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72089
1823