Skip to content

Commit

Permalink
feat(wire): show wire bank name instead of user
Browse files Browse the repository at this point in the history
  • Loading branch information
mperdomo-bc committed Mar 20, 2024
1 parent d7e1433 commit eb65062
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ const renderBankText = (
): string | ReactElement => {
if ('agent' in value) {
// BeneficiaryType
return value.name
return value.agent.bankName ?? value.name
}
if ('details' in value && value.details?.bankName) {
// BankTransferAccountType | BSPaymentMethodType
Expand Down Expand Up @@ -901,7 +901,7 @@ const BankWire = ({
</Col>
<Col style={{ width: '100%' }}>
<Content>
<Value asTitle>{beneficiary.name}</Value>
<Value asTitle>{beneficiary.agent.bankName ?? beneficiary.name}</Value>
<Title asValue>Wire Account ending in {beneficiary.address.slice(-4)}</Title>

{type === 'DEPOSIT' && (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import React from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useDispatch } from 'react-redux'
import { destroy } from 'redux-form'

import { Button, Icon, Text } from 'blockchain-info-components'
import FlyoutFooter from 'components/Flyout/Footer'
import { modals } from 'data/actions'
import { getModals } from 'data/modals/selectors'
import { ModalName } from 'data/types'

import { Header } from '../Header'
import { WIRE_BANK_FORM } from './constants'
import { FinalStatusWrapper } from './StepsStyles'
import { getFiatCurrency } from 'data/components/brokerage/selectors'

const Failure = ({ message, title }: { message?: string; title?: string }) => {
const dispatch = useDispatch()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const Success: React.FC<InjectedFormProps<{}, Props> & Props> = ({
<ItemWrapper key={beneficiary.id} onClick={() => onBankClick(beneficiary)}>
<StandardRow
icon={<Image name={getBankLogoImageName(beneficiary.agent)} />}
topLeftText={beneficiary.name}
topLeftText={beneficiary.agent.bankName ?? beneficiary.name}
topRightText={beneficiary.address}
bottomLeftText={
availableAmount && (
Expand Down

0 comments on commit eb65062

Please sign in to comment.