fix: remove unnecessary code

This commit is contained in:
José Oliveira 2022-04-26 22:21:58 +01:00 committed by siiky
parent 81ef96a670
commit d72fc97f98

View file

@ -17,15 +17,12 @@ function request (graphqlQuery, token) {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': `Bearer ${token}` 'Authorization': `Bearer ${token}`
} }
return Promise.resolve(true) return axios({
.then(() => { method: 'post',
return axios({ url: URI,
method: 'post', headers: headers,
url: URI, data: graphqlQuery
headers: headers, })
data: graphqlQuery
})
})
.then(r => { .then(r => {
if (r.error) throw r.error if (r.error) throw r.error
return r.data return r.data
@ -45,7 +42,6 @@ function getGaloyAccount (token) {
'operationName': 'me', 'operationName': 'me',
'query': `query me { 'query': `query me {
me { me {
createdAt
defaultAccount { defaultAccount {
defaultWalletId defaultWalletId
wallets { wallets {
@ -55,7 +51,6 @@ function getGaloyAccount (token) {
transactions { transactions {
edges { edges {
node { node {
createdAt
direction direction
id id
settlementAmount settlementAmount
@ -91,9 +86,6 @@ function getGaloyAccount (token) {
} }
} }
id id
phone
twoFAEnabled
username
} }
}`, }`,
'variables': {} 'variables': {}
@ -269,7 +261,7 @@ function getStatus (account, tx, requested, settings, operatorId) {
return 'notSeen' return 'notSeen'
} }
const externalCryptoCode = coinUtils.getExternalCryptoCode(cryptoCode) const externalCryptoCode = coinUtils.getExternalCryptoCode(cryptoCode)
const address = coinUtils.parseUrl(address) const address = coinUtils.parseUrl(toAddress)
return checkCryptoCode(cryptoCode) return checkCryptoCode(cryptoCode)
.then(() => getGaloyAccount(account.apiKey)) .then(() => getGaloyAccount(account.apiKey))
.then(galoyAccount => { .then(galoyAccount => {