Skip to content
This repository has been archived by the owner on Dec 13, 2019. It is now read-only.

Commit

Permalink
Switch to function syntax vs const lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
snario committed Aug 2, 2019
1 parent 4827f46 commit 38ecdfe
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions packages/node/src/message-handling/handle-protocol-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,26 +154,36 @@ function getOutgoingEventDataFromProtocol(
}
}

const getStateUpdateEventData = (
function getStateUpdateEventData(
{ appIdentityHash: appInstanceId }: TakeActionParams | UpdateParams,
newState: SolidityValueType
) => ({ newState, appInstanceId });
) {
return { newState, appInstanceId };
}

const getUninstallVirtualAppEventData = ({
function getUninstallVirtualAppEventData({
intermediaryXpub: intermediaryIdentifier,
targetAppIdentityHash: appInstanceId
}: UninstallVirtualAppParams) => ({ appInstanceId, intermediaryIdentifier });
}: UninstallVirtualAppParams) {
return { appInstanceId, intermediaryIdentifier };
}

const getUninstallEventData = ({
function getUninstallEventData({
appIdentityHash: appInstanceId
}: UninstallParams) => ({ appInstanceId });
}: UninstallParams) {
return { appInstanceId };
}

const getWithdrawEventData = ({ amount }: WithdrawParams) => amount;
function getWithdrawEventData({ amount }: WithdrawParams) {
return amount;
}

const getSetupEventData = (
function getSetupEventData(
{ initiatorXpub: counterpartyXpub, multisigAddress }: SetupParams,
owners: string[]
) => ({ multisigAddress, owners, counterpartyXpub });
) {
return { multisigAddress, owners, counterpartyXpub };
}

/**
* Produces an array of queues that the client must halt execution on
Expand Down

0 comments on commit 38ecdfe

Please sign in to comment.