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

Swap view - asserting transaction output fails #459

Closed
IgorSimj opened this issue Feb 24, 2023 · 1 comment
Closed

Swap view - asserting transaction output fails #459

IgorSimj opened this issue Feb 24, 2023 · 1 comment

Comments

@IgorSimj
Copy link

For example, Alice have 10 TOK and Bob have 5 KOT

Swap view is initiated (from Alice's node), 1 TOK for 1 KOT.
After Bob add his own transfers execution continue at Alice's node where tx outputs will be checked.


outputs, err := tx.Outputs()
os := outputs.ByRecipient(other)
assert.Equal(0, os.Sum().Cmp(big.NewInt(int64(t.FromQuantity))))

'os' object contain Bob's outputs (1 TOK, 4 KOT) and assert will fail.
Here, we need to analyze action by action.

IgorSimj added a commit to IgorSimj/fabric-token-sdk that referenced this issue Feb 28, 2023
IgorSimj added a commit to IgorSimj/fabric-token-sdk that referenced this issue Feb 28, 2023
IgorSimj added a commit to IgorSimj/fabric-token-sdk that referenced this issue Mar 10, 2023
Signed-off-by: Igor Simjanoski <[email protected]>
Signed-off-by: IgorSimj <[email protected]>
@adecaro
Copy link
Contributor

adecaro commented Nov 29, 2024

done

@adecaro adecaro closed this as completed Nov 29, 2024
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

2 participants