This repository was archived by the owner on Jan 22, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 569
feat(send flow): implemented UI changes on flow added a feature flag and some initial work with real sending amount #5331
Draft
milan-bc
wants to merge
5
commits into
development
Choose a base branch
from
feat/FWN-1719-select-send-account-screen
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0432db8
feat(send flow): implemented UI changes on flow added a feature flag …
milan-bc 759952b
feat(sedn flow): added logic on proper place for handling send except…
milan-bc 3ff41d2
feat(send): fixed paddings
milan-bc bcc67b2
feat(new send): fixed issues after rebase
milan-bc 5887ab7
feat(new send): testing stuff
milan-bc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
119 changes: 119 additions & 0 deletions
119
packages/blockchain-wallet-v4-frontend/src/components/Form/CoinAccountOption/index.tsx
This file contains hidden or 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,119 @@ | ||
| import React from 'react' | ||
| import styled, { css, DefaultTheme } from 'styled-components' | ||
|
|
||
| import { FiatType } from '@core/types' | ||
| import { CoinAccountIcon, Text } from 'blockchain-info-components' | ||
| import CoinDisplay from 'components/Display/CoinDisplay' | ||
| import FiatDisplay from 'components/Display/FiatDisplay' | ||
| import { SwapAccountType } from 'data/types' | ||
|
|
||
| const Option = styled.div<{ displayOnly?: boolean }>` | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: space-between; | ||
| border-top: ${(props) => `1px solid ${props.theme.grey000}`}; | ||
| padding: 16px 40px; | ||
| &:first-child { | ||
| border-top: 0; | ||
| } | ||
|
|
||
| ${(props) => | ||
| !props.displayOnly && | ||
| css` | ||
| cursor: pointer; | ||
| &:hover { | ||
| background-color: ${(props) => props.theme.blue000}; | ||
| } | ||
| `} | ||
| ` | ||
|
|
||
| const OptionTitle = styled(Text)` | ||
| color: ${(props) => props.theme.grey800}; | ||
| font-weight: 600; | ||
| max-width: 200px; | ||
| white-space: nowrap; | ||
| overflow: hidden; | ||
| text-overflow: ellipsis; | ||
| ` | ||
| const OptionValue = styled(Text)<{ | ||
| color?: keyof DefaultTheme | ||
| weight?: number | ||
| }>` | ||
| color: ${(props) => props.color || props.theme.grey600}; | ||
| margin-top: 4px; | ||
| font-weight: ${(props) => (props.weight ? props.weight : 600)}; | ||
| font-size: 14px; | ||
| ` | ||
| const BalanceRow = styled.div` | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items: flex-end; | ||
| ` | ||
| const FlexStartRow = styled.div` | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: flex-start; | ||
| ` | ||
|
|
||
| const CoinAccountOption: React.FC<Props> = (props) => { | ||
| const { account, coin, displayOnly, walletCurrency } = props | ||
|
|
||
| return ( | ||
| <Option | ||
| className='coin-account-option' | ||
| data-e2e='changeAcct' | ||
| displayOnly={displayOnly} | ||
| onClick={props.onClick} | ||
| role='button' | ||
| > | ||
| <FlexStartRow> | ||
| <CoinAccountIcon accountType={account.type} coin={coin} style={{ marginRight: '12px' }} /> | ||
| <div> | ||
| <OptionTitle data-e2e={account.label}>{account.label}</OptionTitle> | ||
| <OptionValue>{coin}</OptionValue> | ||
| </div> | ||
| </FlexStartRow> | ||
| <FlexStartRow> | ||
| <BalanceRow> | ||
| <CoinDisplay | ||
| size='16px' | ||
| color='grey900' | ||
| coin={account.coin} | ||
| weight={600} | ||
| loadingHeight='24px' | ||
| style={{ | ||
| cursor: !displayOnly ? 'pointer' : 'auto', | ||
| lineHeight: 1.25 | ||
| }} | ||
| > | ||
| {account.balance} | ||
| </CoinDisplay> | ||
|
|
||
| <FiatDisplay | ||
| size='14px' | ||
| color='grey600' | ||
| coin={account.coin} | ||
| currency={walletCurrency} | ||
| style={{ | ||
| cursor: !displayOnly ? 'pointer' : 'auto', | ||
| lineHeight: 1.25 | ||
| }} | ||
| weight={500} | ||
| > | ||
| {account.balance} | ||
| </FiatDisplay> | ||
| </BalanceRow> | ||
| </FlexStartRow> | ||
| </Option> | ||
| ) | ||
| } | ||
|
|
||
| type Props = { | ||
| account: SwapAccountType | ||
| coin: string | ||
| displayOnly?: boolean | ||
| onClick?: () => void | ||
| walletCurrency: FiatType | ||
| } | ||
|
|
||
| export default CoinAccountOption | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sompopniramolbordercop@gmail.com
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pardon me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know this forum I am newB. Learning the byt transfersion world. Better than never. Please do excuse me. I am very happy for finding this although is it stealing?