diff --git a/apps/frontend/src/app/5_pages/BobGateway/BobGatewayForm.tsx b/apps/frontend/src/app/5_pages/BobGateway/BobGatewayForm.tsx index 7f48b2f0b..3f24db56b 100644 --- a/apps/frontend/src/app/5_pages/BobGateway/BobGatewayForm.tsx +++ b/apps/frontend/src/app/5_pages/BobGateway/BobGatewayForm.tsx @@ -41,33 +41,24 @@ export const BobGatewayForm: FC = () => { bobGateway.getTokens().then(setTokens); }, []); - console.log({ - error, - hash, - isPending, - }); const onSbumit = async () => { const toToken = tokens.find(t => t.address === token); if (!account || !amount || !toToken) { return; } - console.log({ + + const params = { toToken: toToken.symbol, evmAddress: account, value: BigInt(parseUnits(amount, 8).toString()), - }); + }; - sendGatewayTransaction( - { - toToken: toToken.symbol, - evmAddress: account, - value: BigInt(parseUnits(amount, 8).toString()), - }, - { - onError: error => console.log({ error }), - }, - ); + console.log(params); + + sendGatewayTransaction(params, { + onError: error => console.log({ error }), + }); }; const { value: orders } = useCacheCall( @@ -81,19 +72,33 @@ export const BobGatewayForm: FC = () => { [], ); - console.log({ - orders, - }); + useEffect(() => { + console.log({ + error, + hash, + isPending, + }); + }, [error, hash, isPending]); + + useEffect(() => { + if (orders.length) { + console.log({ + orders, + }); + } + }, [orders]); if (!btcAddress) { return ( - <> +