mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
fix edit compute checksums for files and container
This commit is contained in:
parent
74f211d45d
commit
2ef29d905e
@ -334,14 +334,18 @@ export async function createTrustedAlgorithmList(
|
|||||||
)
|
)
|
||||||
|
|
||||||
for (const selectedAlgorithm of selectedAssets) {
|
for (const selectedAlgorithm of selectedAssets) {
|
||||||
|
const sanitizedAlgorithmContainer = {
|
||||||
|
entrypoint: selectedAlgorithm.metadata.algorithm.container.entrypoint,
|
||||||
|
image: selectedAlgorithm.metadata.algorithm.container.image,
|
||||||
|
tag: selectedAlgorithm.metadata.algorithm.container.tag,
|
||||||
|
checksum: selectedAlgorithm.metadata.algorithm.container.checksum
|
||||||
|
}
|
||||||
const trustedAlgorithm = {
|
const trustedAlgorithm = {
|
||||||
did: selectedAlgorithm.id,
|
did: selectedAlgorithm.id,
|
||||||
containerSectionChecksum: getHash(
|
containerSectionChecksum: getHash(
|
||||||
JSON.stringify(selectedAlgorithm.metadata.algorithm.container)
|
JSON.stringify(sanitizedAlgorithmContainer)
|
||||||
),
|
),
|
||||||
filesChecksum: getHash(
|
filesChecksum: getHash(selectedAlgorithm.services[0].files)
|
||||||
JSON.stringify(selectedAlgorithm.services[0].files)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
trustedAlgorithms.push(trustedAlgorithm)
|
trustedAlgorithms.push(trustedAlgorithm)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user