Skip to content

Commit

Permalink
cli: fixes on missing params, enable toDevice by default
Browse files Browse the repository at this point in the history
  • Loading branch information
andrevmatos committed Oct 6, 2020
1 parent dd718f4 commit 27e7011
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion raiden-cli/src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"noDelivery": true,
"noReceive": false,
"noMediate": false,
"webRTC": true
"webRTC": true,
"toDevice": true
},
"autoSettle": true
}
2 changes: 1 addition & 1 deletion raiden-cli/src/routes/channels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ async function openChannel(this: Cli, request: Request, response: Response, next
// a better solution.
await this.raiden.openChannel(token, partner, {
settleTimeout: request.body.settle_timeout,
deposit: request.body.total_deposit.toString(),
deposit: request.body.total_deposit?.toString?.(),
});
const channel = await this.raiden.channels$
.pipe(pluck(token, partner), first(isntNil))
Expand Down
2 changes: 1 addition & 1 deletion raiden-cli/src/routes/payments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async function doTransfer(this: Cli, request: Request, response: Response, next:
request.params.tokenAddress,
request.params.targetAddress,
request.body.amount.toString(),
{ paymentId: request.body.identifier.toString(), lockTimeout: request.body.lock_timeout },
{ paymentId: request.body.identifier?.toString?.(), lockTimeout: request.body.lock_timeout },
);
const transfer = await this.raiden.waitTransfer(transferKey);
response.send(transformSdkTransferToApiPayment(transfer));
Expand Down
3 changes: 3 additions & 0 deletions raiden-cli/src/utils/logging.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import fs from 'fs';
import util from 'util';
import logging, { LoggingMethod } from 'loglevel';

util.inspect.defaultOptions.depth = 3; // +1 from default of 2

export function setupLoglevel(output?: string): void {
const originalFactory = logging.methodFactory;

Expand Down

0 comments on commit 27e7011

Please sign in to comment.