Disable srm deposit button if srm wallet account doesn't exist
This commit is contained in:
parent
a38752d792
commit
3a3682c085
|
@ -14,7 +14,7 @@ type AccountSelectProps = {
|
|||
onSelectAccount: (x) => any
|
||||
getBalance?: (x) => any
|
||||
hideAddress?: boolean
|
||||
symbols?: Array<{ [key: string]: string }>
|
||||
symbols?: { [key: string]: string }
|
||||
}
|
||||
|
||||
const AccountSelect = ({
|
||||
|
|
|
@ -91,6 +91,7 @@ const DepositSrmModal = ({ isOpen, onClose }) => {
|
|||
</Modal.Header>
|
||||
<>
|
||||
<AccountSelect
|
||||
symbols={{ SRM: srmMintAddress }}
|
||||
accounts={depositAccounts}
|
||||
selectedAccount={selectedAccount}
|
||||
onSelectAccount={setSelectedAccount}
|
||||
|
@ -116,7 +117,11 @@ const DepositSrmModal = ({ isOpen, onClose }) => {
|
|||
/>
|
||||
</div>
|
||||
<div className={`mt-5 flex justify-center`}>
|
||||
<Button onClick={handleDeposit} className="w-full">
|
||||
<Button
|
||||
onClick={handleDeposit}
|
||||
className="w-full"
|
||||
disabled={!selectedAccount}
|
||||
>
|
||||
<div className={`flex items-center justify-center`}>
|
||||
{submitting && <Loading />}
|
||||
{`Deposit ${inputAmount ? inputAmount : ''} SRM
|
||||
|
|
Loading…
Reference in New Issue