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

fix: braavos achievement #90

Merged
merged 3 commits into from
Oct 10, 2023
Merged

fix: braavos achievement #90

merged 3 commits into from
Oct 10, 2023

Conversation

irisdv
Copy link
Collaborator

@irisdv irisdv commented Oct 10, 2023

PR fixing an issue in Braavos achievement because some NFTs have different names. It adds regex matching in the Braavos whitelisting & duplicate check function.

@irisdv irisdv requested a review from Th0rgal October 10, 2023 09:37
];
if let Some(name) = nft.name.as_ref() {
return whitelist.contains(&name.as_str());
for pattern in &whitelist_patterns {
let re = Regex::new(pattern).unwrap();
Copy link
Member

Choose a reason for hiding this comment

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

Optimization: please use lazy_static to build regexes outside of the function so they don't get rebuilt every time

@Th0rgal Th0rgal self-requested a review October 10, 2023 10:21
Copy link
Member

@Th0rgal Th0rgal left a comment

Choose a reason for hiding this comment

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

lgtm

@Th0rgal Th0rgal merged commit 6b23faf into master Oct 10, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants