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

fix: disallow transferring amounts <=0 #1827

Merged
merged 5 commits into from
Mar 5, 2024

Conversation

Dhaiwat10
Copy link
Member

Summary

This PR introduces a new error to the transfer and transferToContract methods on the Account class which appears when a user tries to transfer an amount that's less than or equal to zero, as requested in the original issue.

Closes #1577

@Dhaiwat10 Dhaiwat10 added the bug Issue is a bug label Mar 4, 2024
@Dhaiwat10 Dhaiwat10 self-assigned this Mar 4, 2024
@Dhaiwat10 Dhaiwat10 marked this pull request as ready for review March 4, 2024 08:41
danielbate
danielbate previously approved these changes Mar 4, 2024
Copy link
Contributor

github-actions bot commented Mar 5, 2024

Coverage Report:

Lines Branches Functions Statements
79.47%(-0.01%) 70.21%(+0.01%) 78.04%(+0%) 79.56%(-0.01%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 packages/account/src/account.ts 78.29%
(-0.91%)
55.73%
(+1.35%)
85.71%
(+0%)
78.29%
(-0.91%)

@Dhaiwat10 Dhaiwat10 enabled auto-merge (squash) March 5, 2024 06:15
@Dhaiwat10 Dhaiwat10 merged commit 68533af into master Mar 5, 2024
12 of 13 checks passed
@Dhaiwat10 Dhaiwat10 deleted the dp/disallow-negative-transfers branch March 5, 2024 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disallow transferring <= 0 of an asset
4 participants