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

chore: Replace static str errors #613

Merged
merged 2 commits into from
Nov 26, 2024
Merged

Conversation

aidan46
Copy link
Contributor

@aidan46 aidan46 commented Nov 26, 2024

Description

When I was refactoring the errors for the market pallet, I noticed there we some Result's that returned a static str as the error. This small change adds proper errors for those. static str's cannot be returned as errors in pallet, this future-proofs the error were we to use them in pallets.

@aidan46 aidan46 self-assigned this Nov 26, 2024
@aidan46 aidan46 added the ready for review Review is needed label Nov 26, 2024
@aidan46 aidan46 added this to the Phase 3 milestone Nov 26, 2024
@aidan46 aidan46 requested a review from a team November 26, 2024 09:15
@aidan46 aidan46 removed the ready for review Review is needed label Nov 26, 2024
@aidan46 aidan46 force-pushed the chore/replace-str-errors branch from b849002 to 66e26ab Compare November 26, 2024 09:21
@aidan46 aidan46 added the ready for review Review is needed label Nov 26, 2024
Copy link
Collaborator

@jmg-duarte jmg-duarte left a comment

Choose a reason for hiding this comment

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

LGTM but if you changed the primitives I'm fairly sure you need to update the SCALE

primitives/proofs/Cargo.toml Show resolved Hide resolved
@aidan46
Copy link
Contributor Author

aidan46 commented Nov 26, 2024

LGTM but if you changed the primitives I'm fairly sure you need to update the SCALE

I thought the same thing, but after running generate-scale against the testnet, no changes to the SCALE file. I think this is because these errors are not used in pallets (yet)

@aidan46 aidan46 added ready for review Review is needed and removed ready for review Review is needed labels Nov 26, 2024
@jmg-duarte jmg-duarte enabled auto-merge (squash) November 26, 2024 11:01
@jmg-duarte jmg-duarte merged commit a318e75 into develop Nov 26, 2024
5 checks passed
@jmg-duarte jmg-duarte deleted the chore/replace-str-errors branch November 26, 2024 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review Review is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants