fix: reject transfer when --from and --to are the same account#410
Open
ygd58 wants to merge 2 commits intologos-blockchain:mainfrom
Open
fix: reject transfer when --from and --to are the same account#410ygd58 wants to merge 2 commits intologos-blockchain:mainfrom
ygd58 wants to merge 2 commits intologos-blockchain:mainfrom
Conversation
Previously, wallet submitted the transaction to the sequencer which rejected it with 'Duplicate account_ids found in message'. The user only saw 'Transaction not found in preconfigured amount of blocks' with no actionable feedback. Now wallet validates upfront and returns a clear error: 'Invalid transfer: --from and --to cannot be the same account' Fixes logos-blockchain#264
Contributor
Author
|
This PR addresses the specific case from #264 where --from and --to point to the same address. The wallet now rejects the transaction upfront with a clear error message before submitting to the sequencer. |
schouhy
approved these changes
Apr 22, 2026
Contributor
Author
|
This PR has approvals from Pravdyvy and schouhy. Ready to merge when convenient. |
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 #264 (partially).
When
--fromand--topoint to the same account, wallet previouslysubmitted the tx and user saw unhelpful error:
error: Transaction not found in preconfigured amount of blocksChange
Added upfront validation: if
from == to, wallet now returns:Invalid transfer: --from and --to cannot be the same accountNote
Other invalid tx scenarios (#265, #268) require deeper changes at
the sequencer level and are out of scope for this PR.
Fixes #264