0

I want to be able to display the full list of payment operations performed to and from an account.

I can view all of the payments and other operations all the way back to the account creation on stellarchain.io here: http://testnet.stellarchain.io/address/GAYHC6KMQDKTT2OVB5OACUXSHNWQYTVQTLF3EZFKLL67TCG543NPJIR6

But when I try to use the sdk to get the transaction history like this:

    getPaymentHistory(account: string) {
    // using .order("desc") to start from most recent
    return fromPromise(this.server.operations().forAccount(account).order("desc").call())
    .pipe(
        tap(res => console.log(res)),
        map(res => res['records'].filter(r => r['type'] == 'payment'))
    )
}

It only returns the 10 most recent payment operations in the "records" array.

Why is this? And how can I get the full history to be returned so I can display it in an application.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.