Hey is a decentralized and permissionless social media app built with Lens Protocol 🌿

refactor: simplify error handling in proMiddleware and remove console logs in Trade component

yoginth.com d9d0dd90 111e3d9c

verified
+2 -5
+1 -2
apps/api/src/middlewares/proMiddleware.ts
··· 31 31 } 32 32 33 33 return next(); 34 - } catch (error) { 35 - console.log(error); 34 + } catch { 36 35 return c.body("Unauthorized", 401); 37 36 } 38 37 };
+1 -3
apps/web/src/components/Account/CreatorCoin/Trade.tsx
··· 107 107 }; 108 108 109 109 const handleSubmit = async () => { 110 - console.log(publicClient); 111 110 if (!address) { 112 111 return toast.error("Connect a wallet to trade"); 113 112 } ··· 124 123 return toast.error("Connect a wallet to trade"); 125 124 } 126 125 127 - const receipt = await tradeCoin({ 126 + await tradeCoin({ 128 127 account: walletClient.account, 129 128 publicClient, 130 129 tradeParameters: params, ··· 132 131 }); 133 132 toast.success("Trade submitted"); 134 133 onClose(); 135 - console.log("trade receipt", receipt); 136 134 } catch (e: any) { 137 135 console.error(e); 138 136 toast.error(e?.message ?? "Trade failed");