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

Wrong Mass Transfer transaction ID in the "/transactions/address" endpoint #106

Open
msmolyakov opened this issue Dec 4, 2021 · 0 comments

Comments

@msmolyakov
Copy link
Member

msmolyakov commented Dec 4, 2021

If you request endpoint /transactions/address/ and read MassTransfer transaction in it, the id will differ from the one specified in JSON.

The reason is that in the endpoint in MassTransfer transaction not all recipients are shown, but only the address to which the request was made. By design, the library waves-transactions-java ignores the id field in JSON and calculates ID on its own. So there's no way to correctly calculate the ID.

For example, there's MassTransfer with id FdEdj5SrJV5qNQT6fnewhguXh77BrHc2xAnQArT6maXr:
https://nodes.wavesnodes.com/transactions/address/3PL9HcwsQEDDekmxxhQJGfVMUKBjKH5LbLH/limit/1?after=AiLvMDnj7G3HSnjyWZphWzLAKCqMa5MdQXFFRWsrAEDo

But WavesJ 1.2.3 returns id 3tVzcELheCV4PKBXK7HFeHmKPrWEfLvhYtapr32MSScf:

Node node = new Node(Profile.MAINNET);

Address address = Address.as("3PL9HcwsQEDDekmxxhQJGfVMUKBjKH5LbLH");
Id after = Id.as("AiLvMDnj7G3HSnjyWZphWzLAKCqMa5MdQXFFRWsrAEDo");

List<TransactionInfo> transactionsByAddress = node.getTransactionsByAddress(address, 1, after);

System.out.println( transactionsByAddress.get(0).tx().id() );
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

No branches or pull requests

1 participant