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(rollapp): logo size now 40kib #1092

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions proto/dymensionxyz/dymension/rollapp/metadata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ message RollappMetadata {
string website = 1;
// description is the rollapp description. should be limited to 512 chars
string description = 2;
// logo_data_uri is a base64 rep with a URI prefix to the rollapp logo. Should be limited to 25kb.
// logo_data_uri is a base64 rep with a URI prefix to the rollapp logo. Size limited
string logo_data_uri = 3;
// token_logo_data_uri is a URI to the native token logo. Should be limited to 25kb.
// token_logo_data_uri is a URI to the native token logo. Size limited
Comment on lines +11 to +13
Copy link
Contributor

Choose a reason for hiding this comment

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

Clarify the size limitations in comments.

The comments for logo_data_uri and token_logo_data_uri have been simplified to "Size limited," which might lead to ambiguity. Consider specifying the size limit to avoid confusion among developers.

- // logo_data_uri is a base64 rep with a URI prefix to the rollapp logo. Size limited
+ // logo_data_uri is a base64 rep with a URI prefix to the rollapp logo. Max size: 40KB

- // token_logo_data_uri is a URI to the native token logo. Size limited
+ // token_logo_data_uri is a URI to the native token logo. Max size: 40KB
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// logo_data_uri is a base64 rep with a URI prefix to the rollapp logo. Size limited
string logo_data_uri = 3;
// token_logo_data_uri is a URI to the native token logo. Should be limited to 25kb.
// token_logo_data_uri is a URI to the native token logo. Size limited
// logo_data_uri is a base64 rep with a URI prefix to the rollapp logo. Max size: 40KB
string logo_data_uri = 3;
// token_logo_data_uri is a URI to the native token logo. Max size: 40KB

string token_logo_data_uri = 4;
// telegram is the rollapp telegram link
string telegram = 5;
Expand Down
2 changes: 1 addition & 1 deletion x/rollapp/types/rollapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const (
maxDescriptionLength = 512
maxURLLength = 256
maxGenesisChecksumLength = 64
maxDataURILength = 25 * 1024 // 25KB
maxDataURILength = 40 * 1024 // 25KB
dataURIPattern = `^data:(?P<mimeType>[\w/]+);base64,(?P<data>[A-Za-z0-9+/=]+)$`
)

Expand Down
Loading