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 rendering the correct src20 image, closes LEA-1993 #6063

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

camerow
Copy link
Collaborator

@camerow camerow commented Jan 16, 2025

Try out Leather build 0a41114Extension build, Test report, Storybook, Chromatic

Specifically fixes the layout of the SRC-20 tokens in this list (before / after use different tokens, but the change is applied to any SRC-20)

Before:

Screenshot 2025-01-16 at 11 56 31 AM

After:

Screenshot 2025-01-16 at 11 58 40 AM

@camerow camerow requested a review from fbwoolf January 16, 2025 19:55
Copy link

linear bot commented Jan 16, 2025

@camerow camerow requested a review from kyranjamie January 16, 2025 19:55
@camerow camerow force-pushed the will/fix-src20-image branch from a15c45c to 3727275 Compare January 16, 2025 19:58
@camerow camerow force-pushed the will/fix-src20-image branch from cfe5baf to cbfd89b Compare January 16, 2025 20:04
@camerow camerow force-pushed the will/fix-src20-image branch from cbfd89b to d300bf9 Compare January 16, 2025 20:07
@fbwoolf
Copy link
Contributor

fbwoolf commented Jan 16, 2025

I can't quite tell what is different here from CollectibleImage but thinking it is just the wrapper layout causing the issue? All good if fixes it.

I see now.

const [isLoading, setIsLoading] = useState(true);
const [width, setWidth] = useState(0);

if (isError) return <Src20AvatarIcon width="xl" />;
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you want to resize the icon here?

Copy link
Contributor

Choose a reason for hiding this comment

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

@camerow I would move this file out of collectibles bc being used in the asset list?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah it seems to make no difference if I resize it or not (perhaps that's the default size).

I can move it, should I move to a new /components/src20/src20-image.tsx or just put it in the src20-tokens-asset-list?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated the location, let me know if it looks ok to you.

@camerow camerow force-pushed the will/fix-src20-image branch from d300bf9 to 0a41114 Compare January 16, 2025 20:33
@camerow camerow merged commit 42ae048 into dev Jan 16, 2025
32 checks passed
@camerow camerow deleted the will/fix-src20-image branch January 16, 2025 21:09
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