trac-peer 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +2 -2
- package/src/protocol.js +7 -0
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -100,7 +100,7 @@ export class Peer extends ReadyResource {
|
|
|
100
100
|
post_tx.value.w, post_tx.value.i, post_tx.value.ipk,
|
|
101
101
|
post_tx.value.ch, post_tx.value.in
|
|
102
102
|
) &&
|
|
103
|
-
|
|
103
|
+
null !== _this.protocol_instance.getError(await _this.contract_instance.execute(op, batch))) {
|
|
104
104
|
let len = await batch.get('txl');
|
|
105
105
|
if(null === len) {
|
|
106
106
|
len = 0;
|
|
@@ -143,7 +143,7 @@ export class Peer extends ReadyResource {
|
|
|
143
143
|
null === await batch.get('sh/'+op.hash) &&
|
|
144
144
|
b4a.byteLength(str_value) <= 10_2400 &&
|
|
145
145
|
chat_status.value === 'on' &&
|
|
146
|
-
|
|
146
|
+
null !== _this.protocol_instance.getError(await _this.contract_instance.execute(op, batch))){
|
|
147
147
|
let len = await batch.get('msgl');
|
|
148
148
|
if(null === len) {
|
|
149
149
|
len = 0;
|
package/src/protocol.js
CHANGED
|
@@ -149,6 +149,13 @@ class Protocol{
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
+
getError(value){
|
|
153
|
+
if (value === false || (value && value.stack && value.message)) {
|
|
154
|
+
return value === false ? 'Generic Error' : value.message;
|
|
155
|
+
}
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
|
|
152
159
|
async tx(subject){ }
|
|
153
160
|
|
|
154
161
|
async customCommand(input){ }
|