Skip to content

Stringify api - Java SDK is working again!#6

Merged
ZaneWithSpoon merged 4 commits intomasterfrom
stringify-api
Mar 14, 2019
Merged

Stringify api - Java SDK is working again!#6
ZaneWithSpoon merged 4 commits intomasterfrom
stringify-api

Conversation

@ZaneWithSpoon
Copy link
Copy Markdown
Member

No description provided.

zocial-arpit and others added 4 commits March 12, 2019 17:17
1. Stringify value, hertz and code variables in Transaction.
2. Added variable params in Transaction and Sdk.
3. Removed test variables such as TEST_CODE and hard-coded values in Sdk.java.
4. Removed hard-coded port number 1975 and instead took it from contact.getEndpoint().getPort().
5. Fixes to Utils.toHexString.
6. Fixed Utils.toAddressFromPublicKey, it was resulting into index out of bound exception.
7. Changed DatatypeConverter.parseHexBinary(method) to method.getBytes() since method will be a normal string, not hex string.
8. In class Node, changed endpoint to httpEndpoint, otherwise it wasn't deserializing delegates' host and port. Also changed variable name from contact to node in Sdk.
9. Fixed hash generation code in Transaction. Instead of Utils.longToBytes(value), value.getBytes() is used. For example, value of zero is stringified as "0" and it seems for hash generation, the blockchain expects us to use it as byte[]{0x30} (note that 0x30 is ASCII for zero) instead of something else.
10. Some more fixes to resolve compilation errors.
@ZaneWithSpoon ZaneWithSpoon merged commit 0234549 into master Mar 14, 2019
@ZaneWithSpoon ZaneWithSpoon deleted the stringify-api branch March 14, 2019 22:06
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.

2 participants