From 64745017e960bd71e13b0fdf3fa31437f577b0c1 Mon Sep 17 00:00:00 2001 From: Cory Perkins <37156131+jcperkins12@users.noreply.github.com> Date: Tue, 2 Oct 2018 04:14:17 -0500 Subject: [PATCH] book_offers returns offers type OfferLedgerEntry (#951) * rippled-api function book_offers returns offers in the format of OfferLedgerEntry not OfferCreateTransaction * updated type of account_objects --- src/common/types/commands/account_objects.ts | 18 ++++++++++++++++-- src/common/types/commands/book_offers.ts | 4 ++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/common/types/commands/account_objects.ts b/src/common/types/commands/account_objects.ts index 25d1cfbd..ffa0a019 100644 --- a/src/common/types/commands/account_objects.ts +++ b/src/common/types/commands/account_objects.ts @@ -1,4 +1,9 @@ -import {CheckLedgerEntry} from '../objects' +import { + CheckLedgerEntry, RippleStateLedgerEntry, + OfferLedgerEntry, SignerListLedgerEntry, + EscrowLedgerEntry, PayChannelLedgerEntry, + DepositPreauthLedgerEntry +} from '../objects' export interface GetAccountObjectsOptions { type?: string | ( @@ -44,7 +49,16 @@ export interface AccountObjectsResponse { account: string, // Array of objects owned by this account. - account_objects: CheckLedgerEntry | object, + // from the getAccountObjects section of the dev center + account_objects: Array< + CheckLedgerEntry | + RippleStateLedgerEntry | + OfferLedgerEntry | + SignerListLedgerEntry | + EscrowLedgerEntry | + PayChannelLedgerEntry | + DepositPreauthLedgerEntry + >, // (May be omitted) The identifying hash of the ledger // that was used to generate this response. diff --git a/src/common/types/commands/book_offers.ts b/src/common/types/commands/book_offers.ts index 175b9a4c..66dc9609 100644 --- a/src/common/types/commands/book_offers.ts +++ b/src/common/types/commands/book_offers.ts @@ -1,7 +1,7 @@ import { TakerRequestAmount, RippledAmount, - OfferCreateTransaction + OfferLedgerEntry } from '../objects' export interface BookOffersRequest { @@ -22,7 +22,7 @@ export interface BookOffersResponse { marker?: any } -export interface BookOffer extends OfferCreateTransaction { +export interface BookOffer extends OfferLedgerEntry { quality?: string owner_funds?: string, taker_gets_funded?: RippledAmount,