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

.toString() is not implemented #2301

Closed
pathornteng opened this issue May 28, 2024 · 8 comments
Closed

.toString() is not implemented #2301

pathornteng opened this issue May 28, 2024 · 8 comments
Assignees
Labels
enhancement New feature or request good first issue Issues which are ideal for a first time or new project contributor. hacktoberfest Issues shown by lists for the Hacktoberfest and made for newcomers to do the first contribution.

Comments

@pathornteng
Copy link

Problem

Currently, our toString function on any object does not return a proper string; instead, it returns an object. We should implement an internal function that serializes a JSON object into a string.

The following code will print [object object]

const newAccount = await new AccountCreateTransaction()
    .setKey(newAccountPublicKey)
    .setInitialBalance(Hbar.from(1))
    .freezeWith(client);

  console.log(newAccount.toString());

Solution

  • implement toString function for all classes

Alternatives

No response

@pathornteng pathornteng added the enhancement New feature or request label May 28, 2024
@YuanBoXie
Copy link

At the same time, is it best to maintain consistency in the field naming of SDK deserialization results in different languages?

@SimiHunjan SimiHunjan added this to the 2.47.0 milestone May 29, 2024
@svetoslav-nikol0v
Copy link
Contributor

Yes, it is. Where do you find a mismatch?

@SimiHunjan SimiHunjan removed this from the 2.47.0 milestone Jun 11, 2024
@SimiHunjan SimiHunjan added the good first issue Issues which are ideal for a first time or new project contributor. label Aug 21, 2024
@hendrikebbers hendrikebbers added good first issue candidate Issues that can become a good first issue but need more description/context. and removed good first issue Issues which are ideal for a first time or new project contributor. labels Sep 30, 2024
@samswag samswag added the hacktoberfest Issues shown by lists for the Hacktoberfest and made for newcomers to do the first contribution. label Sep 30, 2024
@AbhiSharmaNIT
Copy link

I want work on this issue pls assign it to me.

@SimiHunjan SimiHunjan added good first issue Issues which are ideal for a first time or new project contributor. and removed good first issue candidate Issues that can become a good first issue but need more description/context. labels Oct 2, 2024
@SimiHunjan
Copy link
Contributor

You got it! Assigned!

@Jexsie
Copy link
Contributor

Jexsie commented Oct 15, 2024

hey @hendrikebbers @SimiHunjan @AbhiSharmaNIT , i would like to take this forward

@samswag
Copy link

samswag commented Oct 15, 2024

@AbhiSharmaNIT still working on this?

@ivaylonikolov7
Copy link
Contributor

i noticed you create a transaction and then you freeze it. You need to execute the transaction, get the receipt and then get the accountId that the receipt has in it. AccountId has a toString method that should work as expected.

@ivaylonikolov7
Copy link
Contributor

Closed due to inactivity. Please reopen this if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Issues which are ideal for a first time or new project contributor. hacktoberfest Issues shown by lists for the Hacktoberfest and made for newcomers to do the first contribution.
Projects
None yet
Development

No branches or pull requests

9 participants