Skip to content

Commit

Permalink
Merge branch 'GASBT-10-fix-smartcheckout-triggers-without-token-addre…
Browse files Browse the repository at this point in the history
…ss' into test/merge-branch-sale-widget
  • Loading branch information
jhesgodi committed Mar 15, 2024
2 parents 2d6805e + f19e3c3 commit 85f60cb
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function FundWithSmartCheckout({ subView }: FundWithSmartCheckoutProps) {
>(undefined);
const [fundingRouteStepIndex, setFundingRouteStepIndex] = useState<number>(0);
const {
querySmartCheckout, fundingRoutes, smartCheckoutResult, collectionName,
querySmartCheckout, fundingRoutes, smartCheckoutResult, collectionName, fromTokenAddress,
} = useSaleContext();
const { cryptoFiatDispatch } = useContext(CryptoFiatContext);

Expand All @@ -41,9 +41,9 @@ export function FundWithSmartCheckout({ subView }: FundWithSmartCheckoutProps) {
};

useEffect(() => {
if (subView !== FundWithSmartCheckoutSubViews.INIT) return;
if (subView !== FundWithSmartCheckoutSubViews.INIT || !fromTokenAddress) return;
querySmartCheckout();
}, [subView]);
}, [subView, fromTokenAddress]);

useEffect(() => {
if (!cryptoFiatDispatch || !smartCheckoutResult) return;
Expand Down

0 comments on commit 85f60cb

Please sign in to comment.