-
Notifications
You must be signed in to change notification settings - Fork 393
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
Support video avatars #3700
Support video avatars #3700
Conversation
background/redux-slices/accounts.ts
Outdated
@@ -66,6 +66,7 @@ export type AccountData = { | |||
ens: { | |||
name?: DomainName | |||
avatarURL?: URI | |||
avatarType?: string |
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.
FYI: This is changing shape of the redux and in the extension we are persisting redux state between reloads. Usually we are adding redux migration but in this case I think we are fine because we are ok with this field being undefined
. Anyway - I'll test the migration to make sure it is ok.
EDIT:
ok so we will need a migration unfortunately
Reproduction steps:
- checkout
main
- add read-only account with avatar - expected: no avatar is loaded (not even the default one)
- checkout this branch
- reload extension background script
result: no avatar at all, not even the light green background
expected: there is a video avatar visible
The failures in the tests are caused by a known issue: #3675. |
ens: { | ||
name?: DomainName | ||
avatarURL?: URI | ||
avatarType?: string |
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.
old state shouldn't have avatarType
because this is actually the field we just added in this PR right?
|
||
return { | ||
...typedPrevState, | ||
assets: [], |
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.
why we are resetting assets?
if (!avatarURL) { | ||
accountData.avatarType = undefined | ||
} else { | ||
const fileTypeResponse = await fetch(avatarURL, { method: "HEAD" }) |
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 don't think this will work correctly because we are not waiting for results here at all, script will continue sync execution and will deserialize the preloaded state without waiting for these fetches. Actually, now I'm even thinking that we shouldn't even do it here at all - migrations should be working fast and be deterministic 🤔 Sorry about making it more confusing than it should be 😓
Can we try to load the avatarType
when the actual avatar is being loaded on the frontend side?
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.
## What's Changed * Enable swaps on Sepolia testnet by @michalinacienciala in #3710 * Prevent read-only address submission when validating input by @xpaczka in #3705 * Support video avatars by @xpaczka in #3700 * Replace `customStyle` property with `style` by @xpaczka in #3715 * Show tooltips on hovering over icons with no labels by @xpaczka in #3711 * Minor UI issues by @xpaczka in #3716 * Fix hiding unverified assets by @jagodarybacka in #3708 * v0.54.0 by @xpaczka in #3706 * chore(ui): typo fix by @IssouChancla in #3717 * Switch e2e tests run on Goerli to Sepolia by @michalinacienciala in #3719 ## New Contributors * @xpaczka made their first contribution in #3705 * @IssouChancla made their first contribution in #3717 **Full Changelog**: v0.54.0...v0.55.0 Latest build: [extension-builds-3720](https://github.com/tahowallet/extension/suites/19343332470/artifacts/1136165985) (as of Wed, 27 Dec 2023 09:28:52 GMT).
Resolves #3688
What has been done
Added video support for wallet avatars
Testing
0xab7375daf14bc661a0c9aff8800d49a34b037a98
)Latest build: extension-builds-3700 (as of Mon, 18 Dec 2023 14:56:44 GMT).