File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed
react/lib/components/PayButton Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -367,17 +367,15 @@ export const PayButton = ({
367367
368368 useEffect ( ( ) => {
369369 if ( currencyObj && isFiat ( currency ) && price ) {
370- if ( ! convertedCurrencyObj ) {
371- const addressType : Currency = getCurrencyTypeFromAddress ( to ) ;
372- const convertedObj = getCurrencyObject (
373- currencyObj . float / price ,
374- addressType ,
375- randomSatoshis ,
376- ) ;
377- setCryptoAmount ( convertedObj . string ) ;
378- setConvertedCurrencyObj ( convertedObj ) ;
379- }
380- } else if ( ! isFiat ( currency ) && randomSatoshis && ! convertedCurrencyObj ) {
370+ const addressType : Currency = getCurrencyTypeFromAddress ( to ) ;
371+ const convertedObj = getCurrencyObject (
372+ currencyObj . float / price ,
373+ addressType ,
374+ randomSatoshis ,
375+ ) ;
376+ setCryptoAmount ( convertedObj . string ) ;
377+ setConvertedCurrencyObj ( convertedObj ) ;
378+ } else if ( ! isFiat ( currency ) && randomSatoshis ) {
381379 const convertedObj = getCurrencyObject (
382380 amount as number ,
383381 addressType ,
You can’t perform that action at this time.
0 commit comments