diff --git a/api/resolvers/wallet.js b/api/resolvers/wallet.js index c14939d9a..1417f8906 100644 --- a/api/resolvers/wallet.js +++ b/api/resolvers/wallet.js @@ -154,37 +154,6 @@ export function verifyHmac (hash, hmac) { const resolvers = { Query: { invoice: getInvoice, - wallet: async (parent, { id }, { me, models }) => { - if (!me) { - throw new GqlAuthenticationError() - } - - return await models.wallet.findUnique({ - where: { - userId: me.id, - id: Number(id) - }, - include: { - vaultEntries: true - } - }) - }, - walletByType: async (parent, { type }, { me, models }) => { - if (!me) { - throw new GqlAuthenticationError() - } - - const wallet = await models.wallet.findFirst({ - where: { - userId: me.id, - type - }, - include: { - vaultEntries: true - } - }) - return wallet - }, wallets: async (parent, args, { me, models }) => { if (!me) { throw new GqlAuthenticationError() diff --git a/api/typeDefs/wallet.js b/api/typeDefs/wallet.js index 446462cb7..fa8e6a6c6 100644 --- a/api/typeDefs/wallet.js +++ b/api/typeDefs/wallet.js @@ -68,9 +68,7 @@ const typeDefs = ` numBolt11s: Int! connectAddress: String! walletHistory(cursor: String, inc: String): History - wallets(includeReceivers: Boolean, includeSenders: Boolean, onlyEnabled: Boolean, prioritySort: String): [Wallet!]! - wallet(id: ID!): Wallet - walletByType(type: String!): Wallet + wallets: [Wallet!]! walletLogs(type: String, from: String, to: String, cursor: String): WalletLog! failedInvoices: [Invoice!]! } diff --git a/fragments/wallet.js b/fragments/wallet.js index b4d34d30a..ce1090a57 100644 --- a/fragments/wallet.js +++ b/fragments/wallet.js @@ -173,25 +173,6 @@ export const WALLET_FIELDS = gql` } ` -export const WALLET = gql` - ${WALLET_FIELDS} - query Wallet($id: ID!) { - wallet(id: $id) { - ...WalletFields - } - } -` - -// XXX [WALLET] this needs to be updated if another server wallet is added -export const WALLET_BY_TYPE = gql` - ${WALLET_FIELDS} - query WalletByType($type: String!) { - walletByType(type: $type) { - ...WalletFields - } - } -` - export const WALLETS = gql` ${WALLET_FIELDS} query Wallets {