Skip to content
Permalink
Browse files

Inflate channel's settlingUntil value

  • Loading branch information...
ukstv committed Feb 5, 2019
1 parent ed6ae48 commit fd4905f874aceb588fbac163a7f108638cf322bc
Showing with 4 additions and 2 deletions.
  1. +4 −2 packages/machinomy/src/ChannelInflator.ts
@@ -2,6 +2,7 @@ import ChannelEthContract from './ChannelEthContract'
import ChannelTokenContract from './ChannelTokenContract'
import { PaymentChannel, PaymentChannelJSON } from './PaymentChannel'
import { ChannelState } from './ChannelState'
import { BigNumber } from 'bignumber.js'

export default class ChannelInflator {
channelEthContract: ChannelEthContract
@@ -24,7 +25,8 @@ export default class ChannelInflator {
const state = await contract.getState(channelId)
const channel = await contract.channelById(channelId)
if (channel) {
let value = channel[2]
const value = channel[2]
const settlingUntil = new BigNumber(channel[4])

return new PaymentChannel(
paymentChannelJSON.sender,
@@ -35,7 +37,7 @@ export default class ChannelInflator {
state === ChannelState.Impossible ? ChannelState.Settled : state,
paymentChannelJSON.tokenContract,
paymentChannelJSON.settlementPeriod,
paymentChannelJSON.settlingUntil
settlingUntil
)
} else {
return null

0 comments on commit fd4905f

Please sign in to comment.
You can’t perform that action at this time.