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
15 lines
299 B
TypeScript
15 lines
299 B
TypeScript
import hexToBytes from './hexToBytes';
|
|
|
|
export default function hexToBase64(hex: string) {
|
|
const bytes = new Uint8Array(hexToBytes(hex));
|
|
|
|
let binary = '';
|
|
for (const byte of bytes) {
|
|
binary += String.fromCharCode(byte);
|
|
}
|
|
|
|
const base64String = btoa(binary);
|
|
|
|
return base64String;
|
|
}
|