diff --git a/renderer/components/Pay/Pay.js b/renderer/components/Pay/Pay.js index 1d94468e7b8..425c38c8234 100644 --- a/renderer/components/Pay/Pay.js +++ b/renderer/components/Pay/Pay.js @@ -68,13 +68,12 @@ class Pay extends React.Component { // Set a flag so that we can trigger form submission in componentDidUpdate once the form is loaded. componentDidMount() { - const { fetchTickers, queryFees } = this.props + const { fetchTickers } = this.props fetchTickers() - queryFees() } componentDidUpdate(prevProps, prevState) { - const { redirectPayReq, queryRoutes, setRedirectPayReq } = this.props + const { redirectPayReq, queryRoutes, setRedirectPayReq, queryFees } = this.props const { currentStep, invoice, isOnchain } = this.state const { address, amount } = redirectPayReq || {} const { payReq: prevPayReq } = prevProps || {} @@ -107,6 +106,7 @@ class Pay extends React.Component { // If we now have a valid onchain address, trigger the form submit to move to the amount step. const isNowOnchain = isOnchain && isOnchain !== prevState.isOnchain if (currentStep === PAY_FORM_STEPS.address && isNowOnchain) { + queryFees() this.formApi.submitForm() return }