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

int inside of a record seems to be returned as string instead of number #77

Closed
thepiwo opened this issue Oct 31, 2021 · 9 comments
Closed
Labels
component/decoder invalid This doesn't seem right

Comments

@thepiwo
Copy link

thepiwo commented Oct 31, 2021

No description provided.

@marc0olo
Copy link
Contributor

are you sure? I think I tested that some time ago and always received BigInt as representation for int

@thepiwo
Copy link
Author

thepiwo commented Oct 31, 2021

just noticed using the call-data lib in an existing test setup

image

sure, when its supposed to be like this thats fine for me

@marc0olo
Copy link
Contributor

so you are referring to the current state of this branch: https://github.com/aeternity/aepp-sdk-js/tree/feature/calldata ?

and using this branch brings you the result on the right whereas in the past you got the result on the left? (screenshot)

@marc0olo
Copy link
Contributor

marc0olo commented Oct 31, 2021

I am asking because maybe the SDK does some transformation here. I am pretty sure the calldata lib uses BigInt according to the tests I ran few weeks ago.

cc @davidyuk @mradkov

@dincho
Copy link
Member

dincho commented Nov 1, 2021

Please provide minimal reproducible example using the calldata lib public API only. As @marc0olo mentioned this lib works with native BigInts: https://github.com/aeternity/aepp-calldata-js/blob/master/tests/Decoder.js#L307

@dincho dincho added component/decoder invalid This doesn't seem right labels Nov 1, 2021
@davidyuk
Copy link
Member

davidyuk commented Nov 2, 2021

I had a similar issue in sdk tests, it is probably because chai doesn't support BigInt well

@marc0olo
Copy link
Contributor

marc0olo commented Nov 2, 2021

@davidyuk but that's an issue of the SDK then, right? then it's related to this again, isn't it? => aeternity/aepp-sdk-js#1290

@davidyuk
Copy link
Member

davidyuk commented Nov 4, 2021

but that's an issue of the SDK then, right?

Nope, sdk doesn't modify BigInts returned from calldata (I planning to keep it as it is), the bug is in chai package that probably Philipp uses

@marc0olo
Copy link
Contributor

marc0olo commented Nov 4, 2021

@thepiwo did you use chai ? can you confirm and close the issue?

@thepiwo thepiwo closed this as completed Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/decoder invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

4 participants