Remove unused wallet resolvers (#2104)
* Remove unused wallet resolvers * Remove unused wallet resolver args
This commit is contained in:
parent
b6f6cc821c
commit
9b77cf096d
@ -154,37 +154,6 @@ export function verifyHmac (hash, hmac) {
|
|||||||
const resolvers = {
|
const resolvers = {
|
||||||
Query: {
|
Query: {
|
||||||
invoice: getInvoice,
|
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 }) => {
|
wallets: async (parent, args, { me, models }) => {
|
||||||
if (!me) {
|
if (!me) {
|
||||||
throw new GqlAuthenticationError()
|
throw new GqlAuthenticationError()
|
||||||
|
@ -68,9 +68,7 @@ const typeDefs = `
|
|||||||
numBolt11s: Int!
|
numBolt11s: Int!
|
||||||
connectAddress: String!
|
connectAddress: String!
|
||||||
walletHistory(cursor: String, inc: String): History
|
walletHistory(cursor: String, inc: String): History
|
||||||
wallets(includeReceivers: Boolean, includeSenders: Boolean, onlyEnabled: Boolean, prioritySort: String): [Wallet!]!
|
wallets: [Wallet!]!
|
||||||
wallet(id: ID!): Wallet
|
|
||||||
walletByType(type: String!): Wallet
|
|
||||||
walletLogs(type: String, from: String, to: String, cursor: String): WalletLog!
|
walletLogs(type: String, from: String, to: String, cursor: String): WalletLog!
|
||||||
failedInvoices: [Invoice!]!
|
failedInvoices: [Invoice!]!
|
||||||
}
|
}
|
||||||
|
@ -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`
|
export const WALLETS = gql`
|
||||||
${WALLET_FIELDS}
|
${WALLET_FIELDS}
|
||||||
query Wallets {
|
query Wallets {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user