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.
This commit is contained in:
ekzyis 2024-07-08 13:04:02 +02:00
parent 24bdf0a099
commit 80756f23a4
2 changed files with 0 additions and 2 deletions

View File

@ -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)
})
}

View File

@ -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')