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 ( - <> +
{connectors.map(connector => ( - +
); } @@ -134,7 +139,7 @@ export const BobGatewayForm: FC = () => { className="min-w-36 w-full lg:w-auto" />
-