-
Notifications
You must be signed in to change notification settings - Fork 79
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(community): Missing community owner token image #16134
Conversation
@@ -983,4 +983,49 @@ QtObject { | |||
// #15331 | |||
return true | |||
} | |||
|
|||
function toBase64(buffer) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately I cannot useQt.btoa
, because it produces a wrong result (different from js window.btoa
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm.. I wonder how come, this should be identical
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why, but it just produces a different length result.
I've written some tests (in html and qml). And toBase64
works similar to btoa
.
Jenkins BuildsClick to see older builds (7)
|
48d51ca
to
d4342c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (as a workaround)
But I can't really see the minted token at the end of the video (in CollectiblesView)?
@@ -983,4 +983,49 @@ QtObject { | |||
// #15331 | |||
return true | |||
} | |||
|
|||
function toBase64(buffer) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm.. I wonder how come, this should be identical
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a fine workaround for now, but the video seems to show that the image didn't work in the wallet?
The minted token does not appear in the wallet until you restart the app. I've added a bug for this (#16173) mint_image.mp4Other tokens have a blank image because they were created before the fix |
@friofry all good. Can you rebase on latest master. It might fix the build issue and also to make sure it works fine on latest still. |
d4342c4
to
b9c224e
Compare
What does the PR do
(!) suboptimal solution
This issue is a regression after refactoring and sending images as localhost URLs instead of base64 (which is good)
We try to create a token and pass URL as base64 image, SaveCommunityToken(protocol/communities/manager.go) fails to read it.
To keep the old format, I'm fetching image dataUrl (base64) and passing it to the API in the expected format
Affected areas
owner/master token
Architecture compliance
I admit the solution is not perfect. Ideally we should update the approach and just pass the community ID and get the image from the database. Not sure how to crop it properly though. And also update status-go (DeploymentParameters and DeployOwnerToken API endpoint)
My PR is consistent with this document: Architecture guidelines
Screenshot of functionality (including design for comparison)
collectible_img.mp4
Impact on end user
Should fix missing collectible image
How to test
Create a community and mint an owner token, make sure the image is not empty
Risk
(since minting requires paying fees)
fixes #15855