fix: resolve issues #863, #864, #865, #867#994
Merged
Conversation
- Gildado#863: Add non-negative validation for actual_source_amount in complete_path_payment - Gildado#864: Document transfer failure behavior and add test for state consistency - Gildado#865: Emit WithdrawEvent on successful withdraw() and add event test - Gildado#867: Return BatchPartialResult with failure entries from execute_batch_partial; update docs and tests
|
@Smartdevs17 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes four issues across the bulk_payment and asset_path_payment contracts.
Issues Resolved
#863 — [asset_path_payment] actual_source_amount not validated as non-negative before storage
actual_source_amount < 0check withInvalidAmounterror incomplete_path_paymenttest_complete_path_payment_rejects_negative_source_amount#864 — [asset_path_payment] token::Client::transfer failure during escrow release is unhandled
withdraw()doc commenttest_withdraw_transfer_failure_preserves_contract_balanceconfirming contract state is consistent after a failed transfer#865 — [asset_path_payment] No event emitted on successful withdraw()
WithdrawEventcontract event struct withasset,amount,tofieldswithdraw()calltest_withdraw_emits_eventasserting the event is published#867 — [bulk_payment] execute_batch_partial() drops invalid entries without recording them as failed
FailureEntryandBatchPartialResultcontract typesexecute_batch_partialreturn type fromResult<u64, ContractError>toResult<BatchPartialResult, ContractError>failureslist contains(index, amount, reason)for each skipped entrytest_partial_batch_reports_failure_entriescontracts/bulk_payment/README.mdanddocs/whitepaper.mdto document the new return shapeCloses #863
Closes #864
Closes #865
Closes #867