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

Add duplicate checking for public address string in AddPA command #272

Merged
merged 5 commits into from
Nov 10, 2024

Conversation

chongtzezhao
Copy link

@chongtzezhao chongtzezhao commented Nov 9, 2024

@chongtzezhao chongtzezhao added type.Bug A bug priority.High Must do severity.Medium A flaw that causes occasional inconvenience to some users, but they can continue to use the product alpha-bug Bugs found during alpha testing (W11-12) labels Nov 9, 2024
@chongtzezhao chongtzezhao added this to the v1.6 milestone Nov 9, 2024
Copy link

codecov bot commented Nov 9, 2024

Codecov Report

Attention: Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ss/model/addresses/PublicAddressesComposition.java 71.42% 0 Missing and 2 partials ⚠️
Files with missing lines Coverage Δ Complexity Δ
...ddress/logic/commands/AddPublicAddressCommand.java 89.74% <100.00%> (+5.12%) 9.00 <4.00> (+3.00)
...ss/logic/parser/AddPublicAddressCommandParser.java 88.00% <100.00%> (-0.47%) 4.00 <0.00> (ø)
...ss/model/addresses/PublicAddressesComposition.java 74.72% <71.42%> (-0.14%) 69.00 <2.00> (+2.00) ⬇️

@chongtzezhao chongtzezhao removed the alpha-bug Bugs found during alpha testing (W11-12) label Nov 9, 2024
Copy link

@Airiinnn Airiinnn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, necessary validity check as current behavior causes software to misbehave.

retrievepa was broken as it expects publicAddresses to be unique

image

image

.orElseThrow(() -> new CommandException("Public Address to add is missing"))
.getPublicAddressString();

List<String> allPAs = model.getFilteredPersonList().stream()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get all persons instead of just filter list

@chongtzezhao
Copy link
Author

chongtzezhao commented Nov 10, 2024

image

fixes break in retrievepa

Copy link

@Nicholascyx Nicholascyx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@travisim travisim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chongtzezhao chongtzezhao merged commit 431c28b into AY2425S1-CS2103T-T08-1:master Nov 10, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority.High Must do severity.Medium A flaw that causes occasional inconvenience to some users, but they can continue to use the product type.Bug A bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PE-D][Tester B] Duplicate public addess and wallet_name/label allowed for different network
4 participants