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

Collections index #153

Merged
merged 16 commits into from
Jun 29, 2022
Merged

Collections index #153

merged 16 commits into from
Jun 29, 2022

Conversation

miiu96
Copy link
Contributor

@miiu96 miiu96 commented Jun 23, 2022

  • process also the ESDTWipe log in case of an NFT/SFT
  • added an extra index collections that will keep information about a collection
  • use converters.JsonEscape everywhere

@miiu96 miiu96 self-assigned this Jun 23, 2022
@miiu96 miiu96 added the enhancement New feature or request label Jun 24, 2022
@miiu96 miiu96 changed the title Collections index[WIP] Collections index Jun 24, 2022
@miiu96 miiu96 marked this pull request as ready for review June 27, 2022 07:20
@bogdan-rosianu bogdan-rosianu self-requested a review June 27, 2022 07:54
dragos-rebegea
dragos-rebegea previously approved these changes Jun 27, 2022
bogdan-rosianu
bogdan-rosianu previously approved these changes Jun 28, 2022
@@ -189,7 +189,7 @@ func prepareSerializedAccountBalanceHistory(
}

id += fmt.Sprintf("-%d", account.Timestamp)
meta := []byte(fmt.Sprintf(`{ "index" : { "_index":"%s", "_id" : "%s" } }%s`, index, id, "\n"))
meta := []byte(fmt.Sprintf(`{ "index" : { "_index":"%s", "_id" : "%s" } }%s`, index, converters.JsonEscape(id), "\n"))
Copy link
Contributor

Choose a reason for hiding this comment

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

since you prepare the ID, sanitizing is not necessary. but it can remain like this in order to avoid programming errors that would generate non readable characters

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exactly this is an extra protection

@miiu96 miiu96 merged commit febf6d4 into development Jun 29, 2022
@miiu96 miiu96 deleted the collections-index branch June 29, 2022 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants