Skip to content

Commit

Permalink
remove text decoder method
Browse files Browse the repository at this point in the history
  • Loading branch information
pivilartisant committed Dec 18, 2024
1 parent 72667ee commit 8bf4bb2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cli/src/lib/website/read.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ export async function listFiles(
const allStorageKeys = await provider.getStorageKeys(
scAddress,
FILE_LOCATION_TAG
)
const fileLocations = await provider.readStorage(scAddress, allStorageKeys)

const textDecoder = new TextDecoder()
);
const fileLocations = await provider.readStorage(scAddress, allStorageKeys);

return fileLocations.map((location) => textDecoder.decode(location))
return fileLocations.map((location) =>
String.fromCharCode(...new Uint8Array(location))
);
}

/**
Expand Down

0 comments on commit 8bf4bb2

Please sign in to comment.