Skip to content

Commit

Permalink
🐛 fix(llm) account item wrong balance
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasWerey committed Feb 6, 2025
1 parent db88f6a commit 2f0c3bc
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/witty-camels-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": minor
---

Fix accountItem that was using spendableBalance instead of balance
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ const SelectableAccount = ({
padding="8px"
columnGap={8}
>
<AccountItem account={account as Account} balance={account.spendableBalance} />
<AccountItem account={account as Account} balance={account.balance} />
</Flex>
) : (
<Flex flex={1}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const AccountListDrawer = ({ isOpen, onClose, data, onPressAccount }: AccountLis
return (
<TouchableOpacity key={account.id} onPress={() => onPressAccount(account)}>
<Flex flexDirection="row" alignItems="center" padding={3} width={343}>
<AccountItem account={account} balance={account.spendableBalance} showUnit />
<AccountItem account={account} balance={account.balance} showUnit />
</Flex>
</TouchableOpacity>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const CustomHeader = ({ account, onClose, backgroundColor, iconColor }: Props) =
borderBottom={5}
borderBottomColor={"neutral.c30"}
>
<AccountItem account={account} balance={account.spendableBalance} hideBalanceInfo />
<AccountItem account={account} balance={account.balance} hideBalanceInfo />
<Flex alignItems="flex-end">
<TouchableOpacity onPress={onClose}>
<Flex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const View: React.FC<ViewProps> = ({
onPress={onAccountPress.bind(null, item)}
>
<Flex height={40} flexDirection="row" columnGap={12}>
<AccountItem account={item} balance={item.spendableBalance} />
<AccountItem account={item} balance={item.balance} />
</Flex>
</Pressable>
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default function AddAccountsSuccess({ route }: Props) {
padding="12px"
width={343}
>
<AccountItem account={item as Account} balance={item.spendableBalance} />
<AccountItem account={item as Account} balance={item.balance} />
<Icons.ChevronRight size="M" color={colors.primary.c100} />
</Flex>
</TouchableOpacity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default function AddAccountsWarning({ route }: Props) {
>
<AccountItem
account={emptyAccount as Account}
balance={emptyAccount?.spendableBalance as BigNumber}
balance={emptyAccount?.balance || BigNumber(0)}
/>
<Icons.ChevronRight size="M" color={colors.primary.c100} />
</Flex>
Expand Down

0 comments on commit 2f0c3bc

Please sign in to comment.