-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5342 from leather-wallet/release/fees-upgrade
Release/fees upgrade
- Loading branch information
Showing
47 changed files
with
419 additions
and
210 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
37 changes: 37 additions & 0 deletions
37
.../components/crypto-assets/stacks/stx20-token-asset-list/stx20-token-asset-item.layout.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,37 @@ | ||
import { styled } from 'leather-styles/jsx'; | ||
|
||
import { formatBalance } from '@app/common/format-balance'; | ||
import type { Stx20Token } from '@app/query/stacks/stacks-client'; | ||
import { Stx20AvatarIcon } from '@app/ui/components/avatar/stx20-avatar-icon'; | ||
import { ItemLayout } from '@app/ui/components/item-layout/item-layout'; | ||
import { BasicTooltip } from '@app/ui/components/tooltip/basic-tooltip'; | ||
import { Pressable } from '@app/ui/pressable/pressable'; | ||
|
||
interface Stx20TokenAssetItemLayoutProps { | ||
token: Stx20Token; | ||
} | ||
export function Stx20TokenAssetItemLayout({ token }: Stx20TokenAssetItemLayoutProps) { | ||
const balanceAsString = token.balance.amount.toString(); | ||
const formattedBalance = formatBalance(balanceAsString); | ||
|
||
return ( | ||
<Pressable my="space.02"> | ||
<ItemLayout | ||
flagImg={<Stx20AvatarIcon />} | ||
titleLeft={token.tokenData.ticker} | ||
captionLeft="STX-20" | ||
titleRight={ | ||
<BasicTooltip | ||
asChild | ||
label={formattedBalance.isAbbreviated ? balanceAsString : undefined} | ||
side="left" | ||
> | ||
<styled.span data-testid={token.tokenData.ticker} fontWeight={500} textStyle="label.02"> | ||
{formattedBalance.value} | ||
</styled.span> | ||
</BasicTooltip> | ||
} | ||
/> | ||
</Pressable> | ||
); | ||
} |
12 changes: 12 additions & 0 deletions
12
src/app/components/crypto-assets/stacks/stx20-token-asset-list/stx20-token-asset-list.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,12 @@ | ||
import type { Stx20Token } from '@app/query/stacks/stacks-client'; | ||
|
||
import { Stx20TokenAssetItemLayout } from './stx20-token-asset-item.layout'; | ||
|
||
interface Stx20TokenAssetListProps { | ||
tokens: Stx20Token[]; | ||
} | ||
export function Stx20TokenAssetList({ tokens }: Stx20TokenAssetListProps) { | ||
return tokens.map((token, i) => ( | ||
<Stx20TokenAssetItemLayout key={`${token.tokenData.ticker}${i}`} token={token} /> | ||
)); | ||
} |
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
Oops, something went wrong.