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

[Feature Request] Re-allow encodeData to accept a single object not wrapped in an array #291

Open
1 of 4 tasks
CJ42 opened this issue May 24, 2023 · 0 comments
Open
1 of 4 tasks
Labels
enhancement New feature or request

Comments

@CJ42
Copy link
Collaborator

CJ42 commented May 24, 2023

I'm submitting a...

  • bug report
  • feature request
  • question about the decisions made in the repository
  • question about how to use this project

Summary

It used to be possible to pass directly an object to the method .encodeData. Now this needs to be wrapped inside an array [].

It would be great to re-introduce this feature when encoding just one data key.

For instance instead of doing this:

myErc725.encodeData([
  {
    keyName: '5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
    value: {
      json: profileJson,
      url: 'ipfs://QmQTqheBLZFnQUxu5RDs8tA9JtkxfZqMBcmGd9sukXxwRm',
    },
  },
]);

we could simply pass the object directly without wrapping it inside square brackets.

myErc725.encodeData({
    keyName: '5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5',
    value: {
      json: profileJson,
      url: 'ipfs://QmQTqheBLZFnQUxu5RDs8tA9JtkxfZqMBcmGd9sukXxwRm',
    },
  });
@CJ42 CJ42 added the enhancement New feature or request label May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant