another try to get GDT transactions working

This commit is contained in:
Moriz Wahl 2021-08-16 18:11:09 +02:00
parent b633c7006c
commit 6bf2c286a9
3 changed files with 1 additions and 4 deletions

View File

@ -15,7 +15,6 @@ export enum GdtEntryType {
@ObjectType()
export class GdtEntry {
constructor(json: any) {
// console.log(json)
this.transactionId = json.transaction_id
this.amount = json.amount
this.date = json.date

View File

@ -11,7 +11,6 @@ import { Decay } from './Decay'
@ObjectType()
export class Transaction {
constructor(json: any) {
// console.log('Transaction constructor', json)
this.type = json.type
this.balance = Number(json.balance)
this.decayStart = json.decay_start

View File

@ -14,9 +14,8 @@ export class GdtResolver {
{ currentPage = 1, pageSize = 5, order = 'DESC', sessionId }: GdtTransactionSessionIdInput,
): Promise<GdtEntryList> {
const result = await apiGet(
`${CONFIG.GDT_API_URL}/listGDTTransactions/${currentPage}/${pageSize}/${order}/${sessionId}`,
`${CONFIG.COMMUNITY_API_URL}listGDTTransactions/${currentPage}/${pageSize}/${order}/${sessionId}`,
)
// console.log(result.data)
if (!result.success) {
throw new Error(result.data)
}