Skip to content

Commit

Permalink
listpayment fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sangaman committed Sep 7, 2019
1 parent 8d4b763 commit 724679c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 28 deletions.
2 changes: 1 addition & 1 deletion lib/lndclient/LndClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ class LndClient extends SwapClient {
if (includeIncomplete) {
request.setIncludeIncomplete(includeIncomplete);
}
return this.unaryInvoiceCall<lndrpc.ListPaymentsRequest, lndrpc.ListPaymentsResponse>('listPayments', request);
return this.unaryCall<lndrpc.ListPaymentsRequest, lndrpc.ListPaymentsResponse>('listPayments', request);
}

private addHoldInvoice = (request: lndinvoices.AddHoldInvoiceRequest): Promise<lndinvoices.AddHoldInvoiceResp> => {
Expand Down
33 changes: 6 additions & 27 deletions lib/raidenclient/RaidenClient.ts
Original file line number Diff line number Diff line change
@@ -1,37 +1,16 @@
import assert from 'assert';
import http from 'http';
import { SwapClientType, SwapRole, SwapState } from '../constants/enums';
import { CurrencyInstance } from '../db/types';
import Logger from '../Logger';
import SwapClient, { ClientStatus, ChannelBalance, PaymentState } from '../swaps/SwapClient';
import errors from './errors';
import SwapClient, { ChannelBalance, ClientStatus, PaymentState } from '../swaps/SwapClient';
import { SwapDeal } from '../swaps/types';
import { SwapClientType, SwapState, SwapRole } from '../constants/enums';
import assert from 'assert';
import {
RaidenClientConfig,
RaidenInfo,
OpenChannelPayload,
Channel,
TokenPaymentRequest,
TokenPaymentResponse,
} from './types';
import { UnitConverter } from '../utils/UnitConverter';
import { CurrencyInstance } from '../db/types';
import errors from './errors';
import { Channel, OpenChannelPayload, PaymentEvent, RaidenClientConfig, RaidenInfo, TokenPaymentRequest, TokenPaymentResponse } from './types';

type RaidenErrorResponse = { errors: string };

type PaymentEvent = {
event: string;
payment_network_address: string;
token_network_address: string
identifier: number;
amount?: number;
target?: string
initiator?: string;
secret?: string;
route?: string[];
reason?: string;
log_time: string;
};

type PendingTransfer = {
initiator: string;
locked_amount: string;
Expand Down
14 changes: 14 additions & 0 deletions lib/raidenclient/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,17 @@ export type RaidenResolveResponse = {
/** The preimage in hex format. */
secret: string,
};

export type PaymentEvent = {
event: string;
payment_network_address: string;
token_network_address: string
identifier: number;
amount?: number;
target?: string
initiator?: string;
secret?: string;
route?: string[];
reason?: string;
log_time: string;
};

0 comments on commit 724679c

Please sign in to comment.