Skip to content

Commit

Permalink
Update send.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
Tymmmy committed Nov 5, 2024
1 parent 98744bc commit 1a2ec98
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/wallet/frontend/src/pages/send.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ const SendPage: NextPageWithLayout<SendProps> = ({ accounts }) => {
null
)
const router = useRouter()
const receiverFromQueryParams = router.query?.receiver ? decodeURIComponent(router.query.receiver as string) : null;
const receiverFromQueryParams = router.query?.receiver
? decodeURIComponent(router.query.receiver as string)
: null

const [receiverPublicName, setReceiverPublicName] = useState('Recepient')
const [currentExchangeRates, setCurrentExchangeRates] =
Expand Down Expand Up @@ -84,7 +86,9 @@ const SendPage: NextPageWithLayout<SendProps> = ({ accounts }) => {
schema: sendSchema,
defaultValues: {
paymentType: PAYMENT_SEND,
receiver: receiverFromQueryParams ?? (isUserFirstTime ? INTERLEDGER_WALLET_ADDRESS : '')
receiver:
receiverFromQueryParams ??
(isUserFirstTime ? INTERLEDGER_WALLET_ADDRESS : '')
}
})

Expand Down

0 comments on commit 1a2ec98

Please sign in to comment.