mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
Use prefix on checksum.
This commit is contained in:
parent
d7e572c646
commit
7f0d50691c
@ -102,7 +102,7 @@ export class DDO {
|
||||
this.id,
|
||||
]
|
||||
|
||||
return Web3Provider.getWeb3().utils.sha3(values.join("")).replace(/^0x([a-f0-9]{64})(:!.+)?$/i, "$1")
|
||||
return Web3Provider.getWeb3().utils.sha3(values.join("")).replace(/^0x([a-f0-9]{64})(:!.+)?$/i, "0x$1")
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -238,7 +238,7 @@ describe("DDO", () => {
|
||||
const ddo = new DDO(testDDO)
|
||||
const checksum = ddo.getChecksum()
|
||||
|
||||
assert.equal(checksum, "15f27a7a3c7b15d2b06dec7347c6b8da168adddd7df51a8ebbbe87b59b80049b")
|
||||
assert.equal(checksum, "0x15f27a7a3c7b15d2b06dec7347c6b8da168adddd7df51a8ebbbe87b59b80049b")
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user