Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix return type for fetchData #247

Merged
merged 1 commit into from
Oct 27, 2022

Conversation

magalimorin18
Copy link
Contributor

@magalimorin18 magalimorin18 commented Oct 27, 2022

What kind of change does this PR introduce (bug fix, feature, docs update, ...)?

Fix the type of the object returned by fetchData function.

What is the current behaviour (you can also link to an open issue here)?

When fetching profile await erc725.fetchData("LSP3Profile") expects that it will return DecodeDataOutput with value field. But value is typed as string | string[] | URLDataWithHash while in value I get profile object

{
LSP3Profile: 
{...}
}

Link to open issue

What is the new behaviour (if this is a feature change)?

A new type FetchDataOutput was created with the following properties :

FetchDataOutput {
  value:
    | string
    | string[]
    | { LSP3Profile: Record<string, any> }
    | Record<string, any>;
  name: string;
  key: string;
}

Closes #192

@magalimorin18 magalimorin18 changed the title fix: update return type for fetchData Fix return type for fetchData Oct 27, 2022
@Hugoo
Copy link
Contributor

Hugoo commented Oct 27, 2022

Closes #192

@Hugoo Hugoo merged commit 7ffcd64 into ERC725Alliance:develop Oct 27, 2022
@CallumGrindle CallumGrindle mentioned this pull request Oct 28, 2022
This was referenced May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong return type for fetchData
2 participants