@requestnetwork/data-access
Advanced tools
Comparing version 0.6.1-next.1201 to 0.6.1-next.1203
@@ -16,2 +16,3 @@ "use strict"; | ||
const Bluebird = require("bluebird"); | ||
const events_1 = require("events"); | ||
const block_1 = require("./block"); | ||
@@ -98,2 +99,10 @@ const interval_timer_1 = require("./interval-timer"); | ||
const resultAppend = yield this.storage.append(JSON.stringify(updatedBlock)); | ||
const result = Object.assign(new events_1.EventEmitter(), { | ||
meta: { | ||
storageMeta: resultAppend.meta, | ||
topics, | ||
transactionStorageLocation: resultAppend.id, | ||
}, | ||
result: {}, | ||
}); | ||
// Store the data to the real storage | ||
@@ -103,13 +112,15 @@ resultAppend.on('confirmed', (resultAppendConfirmed) => { | ||
this.transactionIndex.updateTimestamp(resultAppendConfirmed.id, resultAppendConfirmed.meta.timestamp); | ||
const resultAfterConfirmation = { | ||
meta: { | ||
storageMeta: resultAppendConfirmed.meta, | ||
topics, | ||
transactionStorageLocation: resultAppendConfirmed.id, | ||
}, | ||
result: {}, | ||
}; | ||
result.emit('confirmed', resultAfterConfirmation); | ||
}); | ||
// adds this transaction to the index, to enable retrieving it later. | ||
yield this.transactionIndex.addTransaction(resultAppend.id, updatedBlock.header, resultAppend.meta.timestamp); | ||
return { | ||
meta: { | ||
storageMeta: resultAppend.meta, | ||
topics, | ||
transactionStorageLocation: resultAppend.id, | ||
}, | ||
result: {}, | ||
}; | ||
return result; | ||
}); | ||
@@ -116,0 +127,0 @@ } |
{ | ||
"name": "@requestnetwork/data-access", | ||
"version": "0.6.1-next.1201+b1589490", | ||
"version": "0.6.1-next.1203+69a84a56", | ||
"publishConfig": { | ||
@@ -43,5 +43,5 @@ "access": "public" | ||
"dependencies": { | ||
"@requestnetwork/multi-format": "0.2.6-next.1201+b1589490", | ||
"@requestnetwork/types": "0.12.1-next.1201+b1589490", | ||
"@requestnetwork/utils": "0.11.1-next.1201+b1589490", | ||
"@requestnetwork/multi-format": "0.2.6-next.1203+69a84a56", | ||
"@requestnetwork/types": "0.12.1-next.1203+69a84a56", | ||
"@requestnetwork/utils": "0.11.1-next.1203+69a84a56", | ||
"bluebird": "3.5.5", | ||
@@ -81,3 +81,3 @@ "keyv": "3.1.0" | ||
}, | ||
"gitHead": "b158949089d2631086352ab2c59b4e50cb14dc03" | ||
"gitHead": "69a84a56cc009664396c33750ea4ec29656b806e" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
121410
1472
1