diff --git a/src/components/app-body/index.js b/src/components/app-body/index.js index 13e4837..1fbc94a 100644 --- a/src/components/app-body/index.js +++ b/src/components/app-body/index.js @@ -28,7 +28,7 @@ function AppBody (props) { return ( <> - } />} /> + } /> } /> } /> } /> diff --git a/src/components/app-body/nfts-for-sale/buy-button.js b/src/components/app-body/nfts-for-sale/buy-button.js index 8ef765a..9f6d418 100644 --- a/src/components/app-body/nfts-for-sale/buy-button.js +++ b/src/components/app-body/nfts-for-sale/buy-button.js @@ -17,7 +17,9 @@ function BuyButton (props) { const [noteId, setNoteId] = useState(false) // show the note id const [success, setSuccess] = useState(false) // show the success message const [showConfirmation, setShowConfirmation] = useState(true) // show the confirmation view + const [progressMsg, setProgressMsg] = useState([]) // show the progress message + // Handler for when user clicks the "Buy" button. const handleBuy = async () => { try { console.log('handleBuy()') @@ -33,6 +35,11 @@ function BuyButton (props) { setOnFetch(false) return */ + + const progress = progressMsg + progress.push(

Generating counter offer transaction...

) + setProgressMsg(progress) + const targetOffer = token.nostrEventId console.log('targetOffer: ', targetOffer) @@ -42,6 +49,9 @@ function BuyButton (props) { targetOffer ) + progress.push(

Uploading counter offer to Nostr...

) + setProgressMsg(progress) + console.log('offerData: ', offerData) console.log('partialHex: ', partialHex) @@ -66,6 +76,7 @@ function BuyButton (props) { } } + // Handler for when user requests to close the modal. const handleClose = () => { console.log('handleClose()') // Deny close if the purchase is in progress. @@ -105,6 +116,7 @@ function BuyButton (props) { > Buy + @@ -117,7 +129,9 @@ function BuyButton (props) { )} + + {/** If the purchase is not confirmed, display the token details. and confirm button. */} {showConfirmation && ( @@ -147,7 +161,13 @@ function BuyButton (props) { {/** show purchase progress */} - {onFetch && } + {onFetch && ( + <> + + {progressMsg} + + )} + {error && ( {error} )} @@ -165,10 +185,18 @@ function BuyButton (props) { {noteId}

+

+ What happens now:
+ The Seller software must finalize the sale by accepting the Counter Offer transaction you just generated. + If their software is online, the token should appear in your wallet within a few minutes. + Before it is accepted, you can cancel the purchase by Sweeping your Counter Offer UXTO back to your wallet. +

)}
+
+ {showConfirmation && ( diff --git a/src/components/app-body/nfts-for-sale/index.js b/src/components/app-body/nfts-for-sale/index.js index 82d9095..8578313 100644 --- a/src/components/app-body/nfts-for-sale/index.js +++ b/src/components/app-body/nfts-for-sale/index.js @@ -243,7 +243,7 @@ function NftsForSale (props) { {/** Show spinner info if tokens are loaded but data is not loaded */ offersAreLoaded && !dataAreLoaded && (
- Loading Tokens Data + Loading Token Data
) @@ -251,7 +251,7 @@ function NftsForSale (props) { {/** Show spinner info if tokens are loaded but icons are not loaded */ dataAreLoaded && !iconsAreLoaded && (
- Loading Tokens Icons + Loading Token Icons
) diff --git a/src/components/nav-menu/index.js b/src/components/nav-menu/index.js index 558a84c..e84b754 100644 --- a/src/components/nav-menu/index.js +++ b/src/components/nav-menu/index.js @@ -78,7 +78,7 @@ function NavMenu (props) { > Check Balance - +