From f66247b4e0a7f391be5866ddfb3dd55fd0ea258a Mon Sep 17 00:00:00 2001 From: vindard <17693119+vindard@users.noreply.github.com> Date: Mon, 5 Feb 2024 21:24:41 -0400 Subject: [PATCH] chore(core): cleanup unused 'wallet' helpers --- core/api/test/helpers/wallet.ts | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/core/api/test/helpers/wallet.ts b/core/api/test/helpers/wallet.ts index fb8fd434bd5..21c7c3c9cb3 100644 --- a/core/api/test/helpers/wallet.ts +++ b/core/api/test/helpers/wallet.ts @@ -1,12 +1,7 @@ import { createChainAddress } from "lightning" -import { - getBalanceForWallet, - getPendingIncomingOnChainTransactionsForWallets, - getTransactionsForWallets, -} from "@/app/wallets" -import { RepositoryError } from "@/domain/errors" -import { WalletsRepository, WalletOnChainAddressesRepository } from "@/services/mongoose" +import { getBalanceForWallet } from "@/app/wallets" +import { WalletOnChainAddressesRepository } from "@/services/mongoose" import { getActiveLnd } from "@/services/lnd/config" export const getBalanceHelper = async ( @@ -17,26 +12,6 @@ export const getBalanceHelper = async ( return balance } -export const getTransactionsForWalletId = async ( - walletId: WalletId, -): Promise | ApplicationError> => { - const wallets = WalletsRepository() - const wallet = await wallets.findById(walletId) - if (wallet instanceof RepositoryError) return wallet - return getTransactionsForWallets({ wallets: [wallet], rawPaginationArgs: {} }) -} - -export const getPendingTransactionsForWalletId = async ( - walletId: WalletId, -): Promise => { - const wallets = WalletsRepository() - const wallet = await wallets.findById(walletId) - if (wallet instanceof RepositoryError) return wallet - return getPendingIncomingOnChainTransactionsForWallets({ - wallets: [wallet], - }) -} - // This is to test detection of funds coming in on legacy addresses // via LND. Remove once all on chain wallets are migrated to Bria export const lndCreateOnChainAddress = async (