diff options
author | Fabio Berger <me@fabioberger.com> | 2017-12-19 18:25:50 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-12-19 18:25:50 +0800 |
commit | b7004b30029f26e3a556676f5e713ba23cd5151d (patch) | |
tree | 34fa179e3985e4977a4b70174d91f99bec566714 /packages/website/ts/components/fill_order.tsx | |
parent | c6af59a3e72d09a123a89e63e0b4ed932c5c9e99 (diff) | |
download | dexon-0x-contracts-b7004b30029f26e3a556676f5e713ba23cd5151d.tar dexon-0x-contracts-b7004b30029f26e3a556676f5e713ba23cd5151d.tar.gz dexon-0x-contracts-b7004b30029f26e3a556676f5e713ba23cd5151d.tar.bz2 dexon-0x-contracts-b7004b30029f26e3a556676f5e713ba23cd5151d.tar.lz dexon-0x-contracts-b7004b30029f26e3a556676f5e713ba23cd5151d.tar.xz dexon-0x-contracts-b7004b30029f26e3a556676f5e713ba23cd5151d.tar.zst dexon-0x-contracts-b7004b30029f26e3a556676f5e713ba23cd5151d.zip |
Refactor remaining _.assign to spread operator
Diffstat (limited to 'packages/website/ts/components/fill_order.tsx')
-rw-r--r-- | packages/website/ts/components/fill_order.tsx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/website/ts/components/fill_order.tsx b/packages/website/ts/components/fill_order.tsx index c96dfe27a..044424fe0 100644 --- a/packages/website/ts/components/fill_order.tsx +++ b/packages/website/ts/components/fill_order.tsx @@ -380,22 +380,24 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> { const isUnseenMakerToken = _.isUndefined(makerTokenIfExists); const isMakerTokenTracked = !_.isUndefined(makerTokenIfExists) && makerTokenIfExists.isTracked; if (isUnseenMakerToken) { - tokensToTrack.push(_.assign({}, this.state.parsedOrder.maker.token, { + tokensToTrack.push({ + ...this.state.parsedOrder.maker.token, iconUrl: undefined, isTracked: false, isRegistered: false, - })); + }); } else if (!isMakerTokenTracked) { tokensToTrack.push(makerTokenIfExists); } const isUnseenTakerToken = _.isUndefined(takerTokenIfExists); const isTakerTokenTracked = !_.isUndefined(takerTokenIfExists) && takerTokenIfExists.isTracked; if (isUnseenTakerToken) { - tokensToTrack.push(_.assign({}, this.state.parsedOrder.taker.token, { + tokensToTrack.push({ + ...this.state.parsedOrder.taker.token, iconUrl: undefined, isTracked: false, isRegistered: false, - })); + }); } else if (!isTakerTokenTracked) { tokensToTrack.push(takerTokenIfExists); } |