legacy-wallet
legacy-wallet copied to clipboard
BCMR hash mismatch
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
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];