@@ -67,6 +67,7 @@ import {
6767 getLinkedXProfile ,
6868 type XProfile ,
6969} from "@/services/x-auth.service" ;
70+ import AuthButton from "@/components/home/AuthButton" ;
7071
7172interface WebSocketTransactionMessage {
7273 tx_id : string ;
@@ -1252,7 +1253,7 @@ export function ProposalSubmission({
12521253 </ div >
12531254 < div >
12541255 < h3 className = "text-xl font-bold mb-2" >
1255- Connect Wallet to unlock earning .
1256+ Connect your testnet Bitcoin Wallet .
12561257 </ h3 >
12571258 </ div >
12581259 </ div >
@@ -1683,88 +1684,91 @@ export function ProposalSubmission({
16831684
16841685 { /* Footer CTA */ }
16851686 < div className = "pt-6" >
1686- < div >
1687- < Button
1688- onClick = { handleSubmit }
1689- disabled = {
1690- ! hasAccessToken ||
1691- ! twitterUrl . trim ( ) ||
1692- ! isValidTwitterUrl ||
1693- isSubmitting ||
1694- isValidatingXUsername ||
1695- ! hasAgentAccount ||
1696- // !hasDaoTokens ||
1697- // !hasAgentDaoTokens ||
1698- isLoadingExtensions ||
1699- isLoadingAgents ||
1700- // isLoadingBalance ||
1701- isCheckingBitcoinBlock ||
1702- hasProposalInCurrentBlock ||
1703- needsXLink ||
1704- isXLoading ||
1705- isLoadingEmbed ||
1706- ! twitterEmbedData ||
1707- ! ! xUsernameError ||
1708- ! canSubmitContribution
1709- }
1710- className = "bg-primary hover:bg-primary/90 text-primary-foreground font-bold px-6 py-2 text-sm rounded-sm shadow-md hover:shadow-lg transition-all duration-200"
1711- >
1712- { isSubmitting ? (
1713- < div className = "flex items-center gap-2 text-center px-2" >
1714- < Loader />
1715- < span className = "break-words" >
1716- { submissionButtonText || "Processing..." }
1687+ { ! hasAccessToken ? (
1688+ < AuthButton buttonText = "Connect Wallet" />
1689+ ) : (
1690+ < div >
1691+ < Button
1692+ onClick = { handleSubmit }
1693+ disabled = {
1694+ ! twitterUrl . trim ( ) ||
1695+ ! isValidTwitterUrl ||
1696+ isSubmitting ||
1697+ isValidatingXUsername ||
1698+ ! hasAgentAccount ||
1699+ // !hasDaoTokens ||
1700+ // !hasAgentDaoTokens ||
1701+ isLoadingExtensions ||
1702+ isLoadingAgents ||
1703+ // isLoadingBalance ||
1704+ isCheckingBitcoinBlock ||
1705+ hasProposalInCurrentBlock ||
1706+ needsXLink ||
1707+ isXLoading ||
1708+ isLoadingEmbed ||
1709+ ! twitterEmbedData ||
1710+ ! ! xUsernameError ||
1711+ ! canSubmitContribution
1712+ }
1713+ className = "bg-primary hover:bg-primary/90 text-primary-foreground font-bold px-6 py-2 text-sm rounded-sm shadow-md hover:shadow-lg transition-all duration-200"
1714+ >
1715+ { isSubmitting ? (
1716+ < div className = "flex items-center gap-2 text-center px-2" >
1717+ < Loader />
1718+ < span className = "break-words" >
1719+ { submissionButtonText || "Processing..." }
1720+ </ span >
1721+ </ div >
1722+ ) : needsXLink ? (
1723+ < span > Link X Account to Submit</ span >
1724+ ) : verificationStatus . status === "pending" ? (
1725+ < div className = "flex items-center gap-2" >
1726+ < Loader />
1727+ < span > X Verification Pending</ span >
1728+ </ div >
1729+ ) : // : verificationStatus.status === "not_verified" ? (
1730+ // <div className="flex items-center gap-2">
1731+ // <Lock className="w-4 h-4" />
1732+ // <span>X Account Not Verified</span>
1733+ // </div>
1734+ // )
1735+ isValidatingXUsername ? (
1736+ < div className = "flex items-center gap-2" >
1737+ < Loader />
1738+ < span > Validating X Username...</ span >
1739+ </ div >
1740+ ) : xUsernameError ? (
1741+ < span > Fix X Username to Submit</ span >
1742+ ) : ! hasAgentAccount ? (
1743+ < span > Waiting for Agent Account</ span >
1744+ ) : // !hasAgentDaoTokens ? (
1745+ // <span>Join DAO to Submit</span>
1746+ // ) :
1747+ isCheckingBitcoinBlock ? (
1748+ < div className = "flex items-center gap-2 text-center px-2" >
1749+ < Loader />
1750+ < span className = "break-words" >
1751+ Checking Bitcoin Block...
1752+ </ span >
1753+ </ div >
1754+ ) : hasProposalInCurrentBlock && currentBitcoinBlock ? (
1755+ < span >
1756+ Wait for Block { ( currentBitcoinBlock + 1 ) . toLocaleString ( ) }
17171757 </ span >
1718- </ div >
1719- ) : ! hasAccessToken ? (
1720- < span > Connect Wallet to Submit</ span >
1721- ) : needsXLink ? (
1722- < span > Link X Account to Submit</ span >
1723- ) : verificationStatus . status === "pending" ? (
1724- < div className = "flex items-center gap-2" >
1725- < Loader />
1726- < span > X Verification Pending</ span >
1727- </ div >
1728- ) : // : verificationStatus.status === "not_verified" ? (
1729- // <div className="flex items-center gap-2">
1730- // <Lock className="w-4 h-4" />
1731- // <span>X Account Not Verified</span>
1732- // </div>
1733- // )
1734- isValidatingXUsername ? (
1735- < div className = "flex items-center gap-2" >
1736- < Loader />
1737- < span > Validating X Username...</ span >
1738- </ div >
1739- ) : xUsernameError ? (
1740- < span > Fix X Username to Submit</ span >
1741- ) : ! hasAgentAccount ? (
1742- < span > Waiting for Agent Account</ span >
1743- ) : // !hasAgentDaoTokens ? (
1744- // <span>Join DAO to Submit</span>
1745- // ) :
1746- isCheckingBitcoinBlock ? (
1747- < div className = "flex items-center gap-2 text-center px-2" >
1748- < Loader />
1749- < span className = "break-words" > Checking Bitcoin Block...</ span >
1750- </ div >
1751- ) : hasProposalInCurrentBlock && currentBitcoinBlock ? (
1752- < span >
1753- Wait for Block { ( currentBitcoinBlock + 1 ) . toLocaleString ( ) }
1754- </ span >
1755- ) : isLoadingEmbed ? (
1756- < div className = "flex items-center gap-2 text-center px-2" >
1757- < Loader />
1758- < span className = "break-words" > Loading Post Content...</ span >
1759- </ div >
1760- ) : (
1761- < div className = "flex items-center gap-2" >
1762- < Send className = "h-4 w-4" />
1763- < span > Submit Contribution</ span >
1764- </ div >
1765- ) }
1766- </ Button >
1767- </ div >
1758+ ) : isLoadingEmbed ? (
1759+ < div className = "flex items-center gap-2 text-center px-2" >
1760+ < Loader />
1761+ < span className = "break-words" > Loading Post Content...</ span >
1762+ </ div >
1763+ ) : (
1764+ < div className = "flex items-center gap-2" >
1765+ < Send className = "h-4 w-4" />
1766+ < span > Submit Contribution</ span >
1767+ </ div >
1768+ ) }
1769+ </ Button >
1770+ </ div >
1771+ ) }
17681772 </ div >
17691773 </ div >
17701774
0 commit comments