Okay using this method solved it:
// https://jameshfisher.com/2017/10/31/web-cryptography-api-hmac/
// https://stackoverflow.com/questions/40031688/javascript-arraybuffer-to-hex
export function buf2hex(buffer: ArrayBuffer): string {
return Array.prototype.map
.call(new Uint8Array(buffer), (x) => ('00' + x.toString(16)).slice(-2))
.join('')
}