Skip to content

Commit

Permalink
Fix linter error.
Browse files Browse the repository at this point in the history
  • Loading branch information
derekpierre committed Sep 4, 2024
1 parent 017aa50 commit aea0eeb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions demos/taco-demo/src/irys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ export const getWebIrys = async (provider: providers.Provider) => {
return webIrys;
};

export const uploadData = async (webIrys: WebIrys, data: unknown): Promise => {
export const uploadData = async (
webIrys: WebIrys,
data: unknown,
): Promise<string> => {
const dataToUpload = JSON.stringify(data);
const receipt = await webIrys.upload(dataToUpload);
console.log(`Data uploaded ==> https://gateway.irys.xyz/${receipt.id}`);
return receipt.id;
};

export const downloadData = async (receiptId: string): Promise => {
export const downloadData = async (receiptId: string): Promise<unknown> => {
const response = await fetch(`https://gateway.irys.xyz/${receiptId}`);
const dataJson = await response.text();
return JSON.parse(dataJson);
Expand Down

0 comments on commit aea0eeb

Please sign in to comment.