trac-msb 0.0.4 → 0.0.5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +3 -3
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "trac-msb",
3
3
  "main": "src/index.js",
4
- "version": "0.0.4",
4
+ "version": "0.0.5",
5
5
  "pear": {
6
6
  "name": "trac-msb",
7
7
  "type": "terminal"
package/src/index.js CHANGED
@@ -68,8 +68,8 @@ export class MainSettlementBus extends ReadyResource {
68
68
  if (null === await view.get(op.key) &&
69
69
  sanitizeTransaction(postTx) &&
70
70
  postTx.op === 'post-tx' &&
71
- crypto.verify(Buffer.from(Buffer.from(postTx.is, 'hex'), postTx.tx, 'utf-8'), Buffer.from(postTx.ipk, 'hex')) &&// sender verification
72
- crypto.verify(BBuffer.from(postTx.ws, 'hex'), uffer.from(postTx.tx, 'utf-8'), Buffer.from(postTx.wp, 'hex')) &&// writer verification
71
+ crypto.verify(Buffer.from(postTx.tx, 'utf-8'), Buffer.from(postTx.is, 'hex'), Buffer.from(postTx.ipk, 'hex')) &&// sender verification
72
+ crypto.verify(Buffer.from(postTx.tx, 'utf-8'), Buffer.from(postTx.ws, 'hex'), Buffer.from(postTx.wp, 'hex')) &&// writer verification
73
73
  Buffer.byteLength(JSON.stringify(postTx)) <= 4096
74
74
  ) {
75
75
  await view.put(op.key, op.value);
@@ -145,7 +145,7 @@ export class MainSettlementBus extends ReadyResource {
145
145
 
146
146
  if (sanitizeTransaction(parsedPreTx) &&
147
147
  parsedPreTx.op === 'pre-tx' &&
148
- crypto.verify(Buffer.from(parsedPreTx.is, 'hex'), Buffer.from(parsedPreTx.tx, 'utf-8'), Buffer.from(parsedPreTx.ipk, 'hex')) &&
148
+ crypto.verify(Buffer.from(parsedPreTx.tx, 'utf-8'), Buffer.from(parsedPreTx.is, 'hex'), Buffer.from(parsedPreTx.ipk, 'hex')) &&
149
149
  parsedPreTx.w === _this.writerLocalKey &&
150
150
  null === await _this.base.view.get(parsedPreTx.tx)
151
151
  ) {