-
-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
316 additions
and
27 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
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
51 changes: 51 additions & 0 deletions
51
suite-native/accounts/src/components/AccountsList/AccountsListStakingItem.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,51 @@ | ||
import { Account } from '@suite-common/wallet-types'; | ||
import { RoundedIcon } from '@suite-native/atoms'; | ||
import { CryptoAmountFormatter, CryptoToFiatAmountFormatter } from '@suite-native/formatters'; | ||
|
||
import { AccountsListItemBase } from './AccountsListItemBase'; | ||
|
||
type AccountsListStakingItemProps = { | ||
account: Account; | ||
stakingCryptoBalance: string; | ||
onPress: () => void; | ||
|
||
hasBackground?: boolean; | ||
isFirst?: boolean; | ||
isLast?: boolean; | ||
}; | ||
|
||
export const AccountsListStakingItem = ({ | ||
account, | ||
onPress, | ||
stakingCryptoBalance, | ||
hasBackground, | ||
isFirst, | ||
isLast, | ||
}: AccountsListStakingItemProps) => { | ||
return ( | ||
<AccountsListItemBase | ||
hasBackground={hasBackground} | ||
isFirst={isFirst} | ||
isLast={isLast} | ||
showDivider={!isLast} | ||
onPress={onPress} | ||
icon={<RoundedIcon name="piggyBank" />} | ||
title="Staking" | ||
mainValue={ | ||
<CryptoToFiatAmountFormatter | ||
value={stakingCryptoBalance} | ||
network={account.symbol} | ||
isBalance | ||
/> | ||
} | ||
secondaryValue={ | ||
<CryptoAmountFormatter | ||
value={stakingCryptoBalance} | ||
network={account.symbol} | ||
numberOfLines={1} | ||
adjustsFontSizeToFit | ||
/> | ||
} | ||
/> | ||
); | ||
}; |
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
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "@suite-native/staking", | ||
"version": "1.0.0", | ||
"private": true, | ||
"license": "See LICENSE.md in repo root", | ||
"sideEffects": false, | ||
"main": "src/index", | ||
"scripts": { | ||
"depcheck": "yarn g:depcheck", | ||
"lint:js": "yarn g:eslint '**/*.{ts,tsx,js}'", | ||
"test:unit": "jest -c ../../jest.config.base.js", | ||
"type-check": "yarn g:tsc --build" | ||
}, | ||
"dependencies": { | ||
"@suite-common/wallet-config": "workspace:*", | ||
"@suite-common/wallet-core": "workspace:*", | ||
"@suite-common/wallet-types": "workspace:*", | ||
"@suite-common/wallet-utils": "workspace:*" | ||
} | ||
} |
Oops, something went wrong.