Skip to content

Commit

Permalink
remove test decoder (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
pivilartisant authored Dec 23, 2024
1 parent db245c2 commit d63302d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cli/src/lib/website/read.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Provider, U32 } from '@massalabs/massa-web3'
import { sha256 } from 'js-sha256'
import { TextDecoder } from 'util'

import {
FILE_LOCATION_TAG,
Expand Down Expand Up @@ -128,8 +127,8 @@ export async function getGlobalMetadata(
const metadataKeyBytes = metadataKeys[index].slice(
globalMetadataKey(new Uint8Array()).length
)
const key = new TextDecoder().decode(metadataKeyBytes)
const value = new TextDecoder().decode(m)
const key = String.fromCharCode(...new Uint8Array(metadataKeyBytes))
const value = String.fromCharCode(...new Uint8Array(m))

return new Metadata(key, value)
})
Expand Down

0 comments on commit d63302d

Please sign in to comment.