Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Audit-5: validate meta data of PNA #183

Open
wants to merge 2 commits into
base: audit-polkadot-stable2409
Choose a base branch
from

Conversation

yrong
Copy link

@yrong yrong commented Oct 17, 2024

@yrong yrong changed the title Validate asset meta data Audit-5: validate asset meta data Oct 18, 2024
@yrong yrong changed the title Audit-5: validate asset meta data Audit-5: validate meta data of PNA Oct 18, 2024
@@ -159,6 +159,12 @@ pub struct AssetMetadata {
pub decimals: u8,
}

impl AssetMetadata {

Choose a reason for hiding this comment

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

Nonblocking: I would prefer to leave AssetMetadata as just plain old data and move this to the call site in the extrinsic. We do not re-use this validate method so its not needed. And I think we should add a test for the extrinsic to make sure the Error is raised in this case.

Copy link
Author

Choose a reason for hiding this comment

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

@yrong yrong marked this pull request as ready for review October 21, 2024 01:46
Copy link

@alistair-singh alistair-singh left a comment

Choose a reason for hiding this comment

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

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants