-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into feat/approver-ux-ui
- Loading branch information
Showing
52 changed files
with
807 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -202,6 +202,14 @@ | |
* dependencies | ||
* @leather.io/ui bumped to 1.27.1 | ||
|
||
### Dependencies | ||
|
||
* The following workspace dependencies were updated | ||
* dependencies | ||
* @leather.io/analytics bumped to 2.0.0 | ||
* @leather.io/tokens bumped to 0.10.0 | ||
* @leather.io/ui bumped to 1.32.2 | ||
|
||
## [1.48.0](https://github.com/leather-io/mono/compare/@leather.io/[email protected]/mobile-v1.48.0) (2024-11-06) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletion
7
apps/mobile/src/common/sheet-navigator/sheet-navigation-container.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
import { ToastWrapper } from '@/components/toast/toast-context'; | ||
import { HasChildren } from '@/utils/types'; | ||
import { NavigationContainer } from '@react-navigation/native'; | ||
|
||
export function SheetNavigationContainer({ children }: HasChildren) { | ||
return <NavigationContainer independent>{children}</NavigationContainer>; | ||
return ( | ||
<ToastWrapper> | ||
<NavigationContainer independent>{children}</NavigationContainer> | ||
</ToastWrapper> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { useLingui } from '@lingui/react'; | ||
|
||
import { Box, Text } from '@leather.io/ui/native'; | ||
|
||
interface AddressTypeBadgeProps { | ||
type: string; | ||
} | ||
export function AddressTypeBadge({ type }: AddressTypeBadgeProps) { | ||
const { i18n } = useLingui(); | ||
|
||
return ( | ||
<Box | ||
bg="ink.background-secondary" | ||
borderColor="ink.border-transparent" | ||
borderRadius="xs" | ||
borderWidth={1} | ||
px="1" | ||
> | ||
<Text color="ink.text-subdued" fontSize={11} fontWeight={500} lineHeight={12}> | ||
{i18n._({ | ||
id: 'address_type_badge.label', | ||
message: '{type}', | ||
values: { type }, | ||
})} | ||
</Text> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
apps/mobile/src/features/account-list/components/account-address.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { AccountId } from '@/models/domain.model'; | ||
import { useAccountDisplayAddress } from '@/store/settings/settings.read'; | ||
|
||
import { Text } from '@leather.io/ui/native'; | ||
import { truncateMiddle } from '@leather.io/utils'; | ||
|
||
type AccountAddressProps = AccountId; | ||
|
||
export function AccountAddress({ accountIndex, fingerprint }: AccountAddressProps) { | ||
const displayAddress = useAccountDisplayAddress(fingerprint, accountIndex); | ||
return ( | ||
<Text variant="caption01" color="ink.text-subdued"> | ||
{truncateMiddle(displayAddress)} | ||
</Text> | ||
); | ||
} |
10 changes: 10 additions & 0 deletions
10
apps/mobile/src/features/account-list/components/account-balance.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Balance } from '@/components/balance/balance'; | ||
import { AccountId } from '@/models/domain.model'; | ||
import { useAccountTotalBalance } from '@/queries/balance/total-balance.query'; | ||
|
||
type AccountBalanceProps = AccountId; | ||
|
||
export function AccountBalance({ accountIndex, fingerprint }: AccountBalanceProps) { | ||
const { totalBalance } = useAccountTotalBalance({ fingerprint, accountIndex }); | ||
return <Balance balance={totalBalance} variant="label02" />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
apps/mobile/src/features/receive/receive-sheets/receive-asset-item.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { AddressTypeBadge } from '@/components/address-type-badge'; | ||
|
||
import { | ||
Box, | ||
CopyIcon, | ||
Flag, | ||
IconButton, | ||
ItemLayout, | ||
Pressable, | ||
Text, | ||
} from '@leather.io/ui/native'; | ||
|
||
interface ReceiveAssetItemProps { | ||
address: string; | ||
addressType?: string; | ||
assetName: string; | ||
assetSymbol: string; | ||
icon: React.ReactNode; | ||
onCopy: () => void; | ||
onPress: () => void; | ||
} | ||
export function ReceiveAssetItem({ | ||
address, | ||
addressType, | ||
assetName, | ||
assetSymbol, | ||
icon, | ||
onCopy, | ||
onPress, | ||
}: ReceiveAssetItemProps) { | ||
return ( | ||
<Pressable flexDirection="row" onPress={onPress}> | ||
<Flag key={assetSymbol} img={icon}> | ||
<ItemLayout | ||
titleLeft={ | ||
<Box alignItems="center" flexDirection="row" gap="1"> | ||
<Text variant="label02">{assetName}</Text> | ||
{addressType && <AddressTypeBadge type={addressType} />} | ||
</Box> | ||
} | ||
actionIcon={<IconButton icon={<CopyIcon />} onPress={onCopy} />} | ||
captionLeft={address} | ||
/> | ||
</Flag> | ||
</Pressable> | ||
); | ||
} |
Oops, something went wrong.