mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* blob page placeholder * txs with blobs list view * tx additional info popup * blob gas info for tx and block * update hints * tx blobs tab * blob details page * add ENV to hide blob txs tab * tx blob fees and adj for tx burnt fees * preliminary tests * blob data convertion * display blob data type in lists * download asset * blob txs in block * tests for blob data preview * fixes * fix tests * support blobs in search * update blob icon * more fixes
10 lines
322 B
TypeScript
10 lines
322 B
TypeScript
// hex can be with prefix - `0x{string}` - or without it - `{string}`
|
|
export default function hexToBytes(hex: string) {
|
|
const bytes = [];
|
|
const startIndex = hex.startsWith('0x') ? 2 : 0;
|
|
for (let c = startIndex; c < hex.length; c += 2) {
|
|
bytes.push(parseInt(hex.substring(c, c + 2), 16));
|
|
}
|
|
return bytes;
|
|
}
|