Skip to content

Commit

Permalink
Make sure the user has a valid address before doing the staking
Browse files Browse the repository at this point in the history
  • Loading branch information
kkosiorowska committed Mar 18, 2024
1 parent 81717eb commit 3f1c6ae
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
} from "#/hooks"
import { ConnectBTCAccount, ConnectETHAccount } from "#/assets/icons"
import { ActionFlowType, PROCESS_STATUSES } from "#/types"
import { isSupportedBTCAddressType } from "#/utils"
import ActionFormModal from "./ActionFormModal"
import MissingAccountModal from "./MissingAccountModal"
import ResumeModal from "./ResumeModal"
Expand All @@ -27,7 +28,7 @@ export default function ModalContentWrapper({
const { type, status, onClose, onResume } = useModalFlowContext()
const { tokenAmount } = useTransactionContext()

if (!btcAccount)
if (!btcAccount || !isSupportedBTCAddressType(btcAccount.address))
return (
<MissingAccountModal
currency="bitcoin"
Expand Down

0 comments on commit 3f1c6ae

Please sign in to comment.