You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exportfunctionhexToByteArray(hexBytes: string){constres=[hexBytes.length/2];//The issuefor(leti=0;i<hexBytes.length;i+=2){consthexdig=hexBytes.substr(i,2);//substr is deprecatedif(hexdig==''){res.push(0);}elseres.push(parseInt(hexdig,16));}returnres;}
As you can see the hexBytes.length / 2 will be the first element of the array thus invalidating the valid hex
[src/core/utils/index.ts]
current code
As you can see the hexBytes.length / 2 will be the first element of the array thus invalidating the valid hex
substr is deprecated as well
I suggest the following script
The text was updated successfully, but these errors were encountered: