Display message for checking balance
This commit is contained in:
parent
588ba22ee6
commit
1839cdced9
@ -52,6 +52,7 @@ const Configure = () => {
|
||||
const [isPaymentDone, setIsPaymentDone] = useState(false);
|
||||
const [isFrameVisible, setIsFrameVisible] = useState(false);
|
||||
const [isAccountsDataReceived, setIsAccountsDataReceived] = useState(false);
|
||||
const [balanceMessage, setBalanceMessage] = useState<string>();
|
||||
|
||||
const [searchParams] = useSearchParams();
|
||||
const templateId = searchParams.get('templateId');
|
||||
@ -287,19 +288,19 @@ const Configure = () => {
|
||||
if (templateId) {
|
||||
createFormData.option === 'Auction'
|
||||
? navigate(
|
||||
`/${orgSlug}/projects/create/success/${projectId}?isAuction=true`,
|
||||
)
|
||||
`/${orgSlug}/projects/create/success/${projectId}?isAuction=true`,
|
||||
)
|
||||
: navigate(
|
||||
`/${orgSlug}/projects/create/template/deploy?projectId=${projectId}&templateId=${templateId}`,
|
||||
);
|
||||
`/${orgSlug}/projects/create/template/deploy?projectId=${projectId}&templateId=${templateId}`,
|
||||
);
|
||||
} else {
|
||||
createFormData.option === 'Auction'
|
||||
? navigate(
|
||||
`/${orgSlug}/projects/create/success/${projectId}?isAuction=true`,
|
||||
)
|
||||
`/${orgSlug}/projects/create/success/${projectId}?isAuction=true`,
|
||||
)
|
||||
: navigate(
|
||||
`/${orgSlug}/projects/create/deploy?projectId=${projectId}`,
|
||||
);
|
||||
`/${orgSlug}/projects/create/deploy?projectId=${projectId}`,
|
||||
);
|
||||
}
|
||||
} catch (error: any) {
|
||||
toast({
|
||||
@ -626,7 +627,7 @@ const Configure = () => {
|
||||
(!selectedAccount || !isBalanceSufficient) ? (
|
||||
<div className="flex items-center gap-4">
|
||||
|
||||
<Button {...buttonSize} shape="default">
|
||||
<Button {...buttonSize} shape="default" onClick={() => setBalanceMessage('Waiting for balance to get updated')}>
|
||||
<a
|
||||
href="https://store.laconic.com"
|
||||
target="_blank"
|
||||
@ -636,10 +637,14 @@ const Configure = () => {
|
||||
</a>
|
||||
</Button>
|
||||
<p className="text-gray-700 dark:text-gray-300">
|
||||
{!selectedAccount ? 'No accounts found. Create a wallet.' : 'Insufficient funds.'}
|
||||
{balanceMessage !== undefined ? (
|
||||
<div className="flex items-center gap-2 text-white">
|
||||
<LoadingIcon className="animate-spin w-5 h-5" />
|
||||
<p>{balanceMessage}</p>
|
||||
</div>
|
||||
) : !selectedAccount ? 'No accounts found. Create a wallet.' : 'Insufficient funds.'}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
) : null
|
||||
) : null}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user