Skip to content

Commit

Permalink
LIVE-3652 - LLM - fix undefined lottie animations for nanoS nanoSP an…
Browse files Browse the repository at this point in the history
…d blue
  • Loading branch information
LFBarreto committed Sep 8, 2022
1 parent 447494f commit 5df97cb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/purple-roses-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": patch
---

LLM - fix issue on lottie animations for nanoS nanoSP and blue
4 changes: 2 additions & 2 deletions apps/ledger-live-mobile/src/components/Animation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ export default function Animation({
}: LottieProps & {
style: ViewStyleProp;
}) {
return (
return lottieProps.source ? (
<Lottie
{...lottieProps}
style={[styles.default, style]}
loop={lottieProps.loop ?? true}
autoPlay={Config.MOCK ? false : lottieProps.autoplay ?? true}
/>
);
) : null;
}
const styles = StyleSheet.create({
default: {
Expand Down
6 changes: 3 additions & 3 deletions apps/ledger-live-mobile/src/helpers/getDeviceAnimation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,11 @@ export function getDeviceAnimation({
)
) {
animation = animations[modelId][key][theme];
} else {
animation =
animations[modelId]?.[wired ? "wired" : "bluetooth"]?.[key][theme];
}

animation =
animations[modelId]?.[wired ? "wired" : "bluetooth"]?.[key][theme];

if (!animation) {
console.error(`No animation for ${modelId} ${key}`);
return null;
Expand Down

0 comments on commit 5df97cb

Please sign in to comment.