diff --git a/react/lib/components/Widget/AltpaymentWidget.tsx b/react/lib/components/Widget/AltpaymentWidget.tsx index 7c7a1469..fe93cb49 100644 --- a/react/lib/components/Widget/AltpaymentWidget.tsx +++ b/react/lib/components/Widget/AltpaymentWidget.tsx @@ -186,7 +186,7 @@ export const AltpaymentWidget: React.FunctionComponent = props copiedMessage.style.padding = "5px 0 5px 5px"; copiedMessage.style.zIndex = "10"; copiedMessage.style.display = "none"; - + if (contentElement) { const content = contentElement.textContent || ""; navigator.clipboard.writeText(content); @@ -344,7 +344,7 @@ export const AltpaymentWidget: React.FunctionComponent = props
{altpaymentShift.id}
Copy copyToClipboard('sideshift_id')}/> - + ) ) : loadingShift ? (

Loading Shift...

@@ -370,6 +370,7 @@ export const AltpaymentWidget: React.FunctionComponent = props Send {pairAmount} {selectedCoin?.name} )} +
= props { handleNetworkChange(e); }} diff --git a/react/lib/components/Widget/Widget.tsx b/react/lib/components/Widget/Widget.tsx index 152888ad..b0fe8be5 100644 --- a/react/lib/components/Widget/Widget.tsx +++ b/react/lib/components/Widget/Widget.tsx @@ -368,7 +368,7 @@ export const Widget: React.FunctionComponent = props => { const usdAmount = usdPrice * +thisAmount setIsAboveMinimumAltpaymentUSDAmount(usdAmount >= MINIMUM_ALTPAYMENT_DOLLAR_AMOUNT) } - }, [to, thisAmount]); + }, [to, thisAmount, usdPrice]); useEffect(() => { const invalidAmount = diff --git a/react/lib/components/Widget/WidgetContainer.tsx b/react/lib/components/Widget/WidgetContainer.tsx index 084dcd4e..92e41a1e 100644 --- a/react/lib/components/Widget/WidgetContainer.tsx +++ b/react/lib/components/Widget/WidgetContainer.tsx @@ -155,7 +155,7 @@ export const WidgetContainer: React.FunctionComponent = } else { const expectedAmount = amount ? resolveNumber(amount) : undefined; const receivedAmount = resolveNumber(transaction.amount); - + if (await shouldTriggerOnSuccess( transaction, currency, @@ -173,7 +173,7 @@ export const WidgetContainer: React.FunctionComponent = if (sound) { txSound.play().catch(() => {}); } - + const currencyTicker = getCurrencyTypeFromAddress(to); if (!hideToasts) enqueueSnackbar( @@ -219,14 +219,14 @@ export const WidgetContainer: React.FunctionComponent = ); useEffect(() => { - if (price === undefined) { + if (price === undefined || price === 0) { (async () => { getPrice(); })() } else { setThisPrice(price) } - }, [currency, price]); + }, [currency, price, usdPrice]); const handleNewTransaction = useCallback( (tx: Transaction) => {