Skip to content

Commit

Permalink
fix: check account balance or spedable is zero in front
Browse files Browse the repository at this point in the history
  • Loading branch information
qperrot committed Jan 29, 2025
1 parent 8fe3614 commit d79528f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/ninety-radios-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": patch
---

Fix solana delegationDisabled condition on LLM
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { SolanaAccount } from "@ledgerhq/live-common/families/solana/types";
import { NavigatorName, ScreenName } from "~/const";
import type { ActionButtonEvent, NavigationParamsType } from "~/components/FabActions";
import { getStakeLabelLocaleBased } from "~/helpers/getStakeLabelLocaleBased";
import { isAccountEmpty } from "@ledgerhq/live-common/account/index";

const getMainActions = ({
account,
Expand All @@ -18,7 +17,7 @@ const getMainActions = ({
parentAccount: Account;
parentRoute: RouteProp<ParamListBase, ScreenName>;
}): ActionButtonEvent[] => {
const delegationDisabled = isAccountEmpty(account);
const delegationDisabled = account.balance.isZero() || account.spendableBalance.isZero() ? true : false;
const label = getStakeLabelLocaleBased();

const navigationParams: NavigationParamsType = delegationDisabled
Expand Down

0 comments on commit d79528f

Please sign in to comment.