Skip to content

Commit

Permalink
fix(wallet-mobile): Typo in specific amount title (#3122)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorbuedo authored Mar 11, 2024
1 parent afa40ec commit ddbea5a
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 109 deletions.
5 changes: 5 additions & 0 deletions apps/wallet-mobile/src/features/Receive/common/useStrings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const useStrings = () => {
const intl = useIntl()

return {
amountToReceive: intl.formatMessage(messages.amountToReceive),
receiveTitle: intl.formatMessage(messages.receiveTitle),
addresscardTitle: intl.formatMessage(messages.addresscardTitle),
shareLabel: intl.formatMessage(messages.shareLabel),
Expand Down Expand Up @@ -34,6 +35,10 @@ export const useStrings = () => {
}

export const messages = defineMessages({
amountToReceive: {
id: 'components.receive.specificamountscreen.title',
defaultMessage: '!!!Amount to receive',
},
receiveTitle: {
id: 'components.receive.receivescreen.title',
defaultMessage: '!!!Receive',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {useCopy} from '../../../legacy/useCopy'
import {useMetrics} from '../../../metrics/metricsManager'
import {useSelectedWallet} from '../../../SelectedWallet'
import {isEmptyString} from '../../../utils'
import {useAddressModeManager} from '../../../wallet-manager/useAddressModeManager'
import {editedFormatter} from '../../../yoroi-wallets/utils'
import {useReceive} from '../common/ReceiveProvider'
import {ShareQRCodeCard} from '../common/ShareQRCodeCard/ShareQRCodeCard'
Expand All @@ -25,19 +24,17 @@ export const RequestSpecificAmountScreen = () => {
const hasAmount = !isEmptyString(amount)

const {selectedAddress} = useReceive()
const {isSingle} = useAddressModeManager()

const screenHeight = useWindowDimensions().height
const modalHeight = (screenHeight / 100) * 80
const {openModal} = useModal()
const modalTitle = isSingle ? strings.singleAddress : strings.multipleAddress

const handleOnGenerateLink = React.useCallback(() => {
Keyboard.dismiss()

track.receiveAmountGeneratedPageViewed({ada_amount: Number(amount)})
openModal(modalTitle, <Modal amount={amount} address={selectedAddress} />, modalHeight)
}, [track, amount, openModal, modalTitle, selectedAddress, modalHeight])
openModal(strings.amountToReceive, <Modal amount={amount} address={selectedAddress} />, modalHeight)
}, [track, amount, openModal, strings.amountToReceive, selectedAddress, modalHeight])

const handleOnChangeAmount = (amount: string) => {
setAmount(editedFormatter(amount))
Expand Down
1 change: 1 addition & 0 deletions apps/wallet-mobile/src/i18n/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"components.receive.addressverifymodal.afterConfirm": "Once you tap on confirm, validate the address on your Ledger device, making sure both the path and the address match what is shown below:",
"components.receive.addressverifymodal.title": "Verify Address on Ledger",
"components.receive.addressview.verifyAddressLabel": "Verify address",
"components.receive.specificamountscreen.title": "Amount to receive",
"components.receive.receivescreen.cannotGenerate": "You have to use some of your addresses",
"components.receive.receivescreen.freshAddresses": "Fresh addresses",
"components.receive.receivescreen.generateButton": "Generate new address",
Expand Down
Loading

0 comments on commit ddbea5a

Please sign in to comment.