@dfinity/assets
Advanced tools
Comparing version 0.19.2 to 0.19.3-react-native
@@ -406,3 +406,3 @@ "use strict"; | ||
// Lookup hash of asset in tree | ||
const treeSha = (0, agent_1.lookup_path)(['http_assets', this._key], hashTree); | ||
const treeSha = (0, agent_1.lookupResultToBuffer)((0, agent_1.lookup_path)(['http_assets', this._key], hashTree)); | ||
return !!treeSha && !!this.sha256 && (0, agent_1.compare)(this.sha256.buffer, treeSha) === 0; | ||
@@ -409,0 +409,0 @@ } |
@@ -12,3 +12,3 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
}; | ||
import { Actor, Cbor as cbor, Certificate, compare, getDefaultAgent, lookup_path, reconstruct, uint8ToBuf, } from '@dfinity/agent'; | ||
import { Actor, Cbor as cbor, Certificate, compare, getDefaultAgent, lookup_path, lookupResultToBuffer, reconstruct, uint8ToBuf, } from '@dfinity/agent'; | ||
import { lebDecode } from '@dfinity/candid'; | ||
@@ -377,3 +377,3 @@ import { PipeArrayBuffer } from '@dfinity/candid/lib/cjs/utils/buffer'; | ||
// Lookup hash of asset in tree | ||
const treeSha = lookup_path(['http_assets', this._key], hashTree); | ||
const treeSha = lookupResultToBuffer(lookup_path(['http_assets', this._key], hashTree)); | ||
return !!treeSha && !!this.sha256 && compare(this.sha256.buffer, treeSha) === 0; | ||
@@ -380,0 +380,0 @@ } |
{ | ||
"name": "@dfinity/assets", | ||
"version": "0.19.2", | ||
"version": "0.19.3-react-native", | ||
"author": "DFINITY Stiftung <sdk@dfinity.org>", | ||
@@ -48,3 +48,2 @@ "license": "Apache-2.0", | ||
"make:docs/reference": "typedoc src/index.ts --out ../../docs/generated/assets", | ||
"release": "npm publish", | ||
"test": "jest", | ||
@@ -54,4 +53,4 @@ "test:coverage": "jest --verbose --collectCoverage" | ||
"peerDependencies": { | ||
"@dfinity/agent": "^0.19.2", | ||
"@dfinity/principal": "^0.19.2", | ||
"@dfinity/agent": "^0.19.3-react-native", | ||
"@dfinity/principal": "^0.19.3-react-native", | ||
"@noble/hashes": "^1.3.1" | ||
@@ -58,0 +57,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
Sorry, the diff of this file is not supported yet
303452