From 80756f23a419a1cd7a6fea2f6d4229f7eb7f0891 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Mon, 8 Jul 2024 13:04:02 +0200 Subject: [PATCH] Remove TODOs TODO in components/wallet-logger.js was handled. I don't see a need for the TODO in lib/wallet.js anymore. This function will only be called with the wallet of type LIGHTNING_ADDRESS anyway. --- components/wallet-logger.js | 1 - lib/wallet.js | 1 - 2 files changed, 2 deletions(-) diff --git a/components/wallet-logger.js b/components/wallet-logger.js index 7d0e467b..61f118eb 100644 --- a/components/wallet-logger.js +++ b/components/wallet-logger.js @@ -146,7 +146,6 @@ export const WalletLoggerProvider = ({ children }) => { { onCompleted: (_, { variables: { wallet: walletType } }) => { setLogs((logs) => { - // TODO: use wallet defs return logs.filter(l => walletType ? l.wallet !== getServerWallet(walletType).name : false) }) } diff --git a/lib/wallet.js b/lib/wallet.js index e7ee6c7b..6b872cc3 100644 --- a/lib/wallet.js +++ b/lib/wallet.js @@ -46,7 +46,6 @@ export async function fetchLnAddrInvoice ({ addr, amount, maxFee, comment, ...pa if (autoWithdraw && decoded.destination === ourPubkey && process.env.NODE_ENV === 'production') { // unset lnaddr so we don't trigger another withdrawal with same destination await models.wallet.deleteMany({ - // TODO: replace hardcoded 'LIGHTNING_ADDRESS' with wallet.type where: { userId: me.id, type: 'LIGHTNING_ADDRESS' } }) throw new Error('automated withdrawals to other stackers are not allowed')