-
Notifications
You must be signed in to change notification settings - Fork 11
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
refactor(core-token-vesting-v2)!: remove recipient #139
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -498,7 +498,6 @@ fn test_withdraw() -> TestResult { | |
|
||
// unauthorized sender | ||
let msg = ExecuteMsg::Withdraw { | ||
recipient: "addr0000".to_string(), | ||
amount: Uint128::new(1000), | ||
}; | ||
require_error( | ||
Comment on lines
498
to
503
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The test Additionally, the test includes a scenario where an unauthorized sender attempts to withdraw funds, which is good for verifying access control. However, it would be beneficial to add a test case that verifies the correct behavior when the sender attempts to withdraw an amount greater than their unallocated balance, ensuring that the contract logic correctly handles such cases. Consider adding explicit assertions to verify that the withdrawn funds are sent to the
The While the test does cover scenarios where the claim is made at different times to verify the amount claimable based on the vesting schedule, it would be beneficial to explicitly assert that the funds are sent to the Enhance the |
||
|
@@ -511,7 +510,6 @@ fn test_withdraw() -> TestResult { | |
|
||
// withdraw more than unallocated | ||
let msg = ExecuteMsg::Withdraw { | ||
recipient: "addr0000".to_string(), | ||
amount: Uint128::new(1001), | ||
}; | ||
let res = | ||
|
@@ -541,7 +539,6 @@ fn test_withdraw() -> TestResult { | |
|
||
// withdraw but there's no more unallocated | ||
let msg = ExecuteMsg::Withdraw { | ||
recipient: "addr0000".to_string(), | ||
amount: Uint128::new(1), | ||
}; | ||
require_error( | ||
|
@@ -797,7 +794,6 @@ fn claim_native() -> TestResult { | |
// valid claim | ||
let info = mock_info("addr0001", &[]); | ||
let msg = ExecuteMsg::Claim { | ||
recipient: None, | ||
denoms: vec![], | ||
}; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do breaking changes for the interface we can get rid of the denom parameter also
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing
denoms
is a breaking change for the UI because it's a mandatory field, but removingrecipient
is not because it's an Optional field, meaning the client doesn't have to send it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can leave it then