legacy-wallet icon indicating copy to clipboard operation
legacy-wallet copied to clipboard

BCMR hash mismatch

Open mr-zwets opened this issue 2 years ago • 1 comments

occurrence: file hash is ca6e2ec3d116be0f26fca99b81bf5cc0b15ce1240972234683a6fd4d66042f53 yet bcmr has 7bdfb6e6fa52cfcb1c338565046f1fc5fe45808b1d1040395e43e82ed921b956

https://tokenexplorer.cash/?tokenId=c87a17d7fa0c8d3a4d8a9ae916e6457abf477ccfc4f2d354d42f562638a1ba5b

-> maybe hashing a 404 page or so from the IPFS gateway, cashonize should check if JSON data is returned

mr-zwets avatar Sep 21 '23 07:09 mr-zwets

I encountered an issue today. It's important to check the response before hashing. and "BCMR" in utf8 with length encoding should be "0442434d52"

const bcmrContent = await response.text(); /// Additional conditions should be added in this block
const hashContent = sha256.hash(utf8ToBin(bcmrContent));
const chunks = ["BCMR", hashContent, inputField];

mrtnetwork avatar Jan 19 '24 07:01 mrtnetwork