@xyo-network/origin-block-repository
Advanced tools
Comparing version 0.53.0 to 0.54.0
@@ -114,7 +114,13 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const result = yield this.originBlocksStorageProvider.read(hash); | ||
if (!result) { | ||
try { | ||
const result = yield this.originBlocksStorageProvider.read(hash); | ||
if (!result) { | ||
return undefined; | ||
} | ||
return this.serializationService.deserialize(result).hydrate(); | ||
} | ||
catch (error) { | ||
// there was an error getting the key, so return undefined | ||
return undefined; | ||
} | ||
return this.serializationService.deserialize(result).hydrate(); | ||
}); | ||
@@ -121,0 +127,0 @@ } |
{ | ||
"name": "@xyo-network/origin-block-repository", | ||
"version": "0.53.0", | ||
"version": "0.54.0", | ||
"description": "An abstraction over a collection of origin blocks and subsequently accessing them", | ||
@@ -10,8 +10,8 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@xyo-network/bound-witness": "^0.53.0", | ||
"@xyo-network/hashing": "^0.53.0", | ||
"@xyo-network/origin-chain": "^0.53.0", | ||
"@xyo-network/serialization": "^0.53.0", | ||
"@xyo-network/serialization-schema": "^0.53.0", | ||
"@xyo-network/storage": "^0.53.0" | ||
"@xyo-network/bound-witness": "^0.54.0", | ||
"@xyo-network/hashing": "^0.54.0", | ||
"@xyo-network/origin-chain": "^0.54.0", | ||
"@xyo-network/serialization": "^0.54.0", | ||
"@xyo-network/serialization-schema": "^0.54.0", | ||
"@xyo-network/storage": "^0.54.0" | ||
}, | ||
@@ -27,3 +27,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "e9e420edc5a6621e8412f5955434b20b313a9fae" | ||
"gitHead": "7378ada28f73de91c9bf844401d82f8a0ee79ee5" | ||
} |
@@ -123,8 +123,13 @@ /* | ||
public async getOriginBlockByHash(hash: Buffer): Promise<IXyoBoundWitness | undefined> { | ||
const result = await this.originBlocksStorageProvider.read(hash) | ||
if (!result) { | ||
try { | ||
const result = await this.originBlocksStorageProvider.read(hash) | ||
if (!result) { | ||
return undefined | ||
} | ||
return this.serializationService.deserialize(result).hydrate<IXyoBoundWitness>() | ||
} catch (error) { | ||
// there was an error getting the key, so return undefined | ||
return undefined | ||
} | ||
return this.serializationService.deserialize(result).hydrate<IXyoBoundWitness>() | ||
} | ||
@@ -131,0 +136,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
509286
538
+ Added@xyo-network/base@0.54.0(transitive)
+ Added@xyo-network/bound-witness@0.54.0(transitive)
+ Added@xyo-network/buffer-utils@0.54.0(transitive)
+ Added@xyo-network/errors@0.54.0(transitive)
+ Added@xyo-network/hashing@0.54.0(transitive)
+ Added@xyo-network/meta-list@0.54.0(transitive)
+ Added@xyo-network/origin-chain@0.54.0(transitive)
+ Added@xyo-network/serialization@0.54.0(transitive)
+ Added@xyo-network/serialization-schema@0.54.0(transitive)
+ Added@xyo-network/signing@0.54.0(transitive)
+ Added@xyo-network/storage@0.54.0(transitive)
+ Added@xyo-network/utils@0.54.0(transitive)
- Removed@xyo-network/base@0.53.0(transitive)
- Removed@xyo-network/bound-witness@0.53.0(transitive)
- Removed@xyo-network/buffer-utils@0.53.0(transitive)
- Removed@xyo-network/errors@0.53.0(transitive)
- Removed@xyo-network/hashing@0.53.0(transitive)
- Removed@xyo-network/meta-list@0.53.0(transitive)
- Removed@xyo-network/origin-chain@0.53.0(transitive)
- Removed@xyo-network/serialization@0.53.0(transitive)
- Removed@xyo-network/serialization-schema@0.53.0(transitive)
- Removed@xyo-network/signing@0.53.0(transitive)
- Removed@xyo-network/storage@0.53.0(transitive)
- Removed@xyo-network/utils@0.53.0(transitive)
Updated@xyo-network/hashing@^0.54.0
Updated@xyo-network/storage@^0.54.0