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

Commit

Permalink
Rename appCfAddress to appInstanceId
Browse files Browse the repository at this point in the history
  • Loading branch information
snario committed Dec 26, 2018
1 parent 7b82b34 commit 4234063
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions packages/contracts/contracts/StateChannelTransaction.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ contract StateChannelTransaction is LibCondition {

/// @notice Execute a fund transfer for a state channel app in a finalized state
/// @param uninstallKey The key in the nonce registry
/// @param appCfAddress Counterfactual address of the app contract
/// @param appInstanceId AppInstanceId to be resolved
/// @param terms The pre-agreed upon terms of the funds transfer
function executeAppConditionalTransaction(
AppRegistry appRegistry,
NonceRegistry nonceRegistry,
bytes32 uninstallKey,
bytes32 appCfAddress,
bytes32 appInstanceId,
Transfer.Terms terms
)
public
Expand All @@ -36,11 +36,11 @@ contract StateChannelTransaction is LibCondition {
);

require(
appRegistry.isStateFinalized(appCfAddress),
appRegistry.isStateFinalized(appInstanceId),
"App is not finalized yet"
);

Transfer.Transaction memory txn = appRegistry.getResolution(appCfAddress);
Transfer.Transaction memory txn = appRegistry.getResolution(appInstanceId);

require(
Transfer.meetsTerms(txn, terms),
Expand Down
4 changes: 2 additions & 2 deletions packages/machine/test/unit/ethereum/install.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,13 @@ describe("InstallCommitment", () => {
appRegistryAddress,
nonceRegistryAddress,
uninstallKey,
appCfAddress,
appInstanceId,
terms
] = calldata.args;
expect(appRegistryAddress).toBe(networkContext.AppRegistry);
expect(nonceRegistryAddress).toBe(networkContext.NonceRegistry);
expect(uninstallKey).toBe(app.uninstallKey);
expect(appCfAddress).toBe(appIdentityToHash(app.identity));
expect(appInstanceId).toBe(appIdentityToHash(app.identity));
expect(terms[0]).toBe(app.terms.assetType);
expect(terms[1]).toEqual(app.terms.limit);
expect(terms[2]).toBe(app.terms.token);
Expand Down
4 changes: 2 additions & 2 deletions packages/machine/test/unit/ethereum/setup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ describe("SetupCommitment", () => {
appRegistry,
nonceRegistry,
uninstallKey,
appCfAddress, // FIXME: Rename this field on the contract
appInstanceId,
[assetType, limit, token]
] = desc.args;
expect(appRegistry).toBe(networkContext.AppRegistry);
expect(nonceRegistry).toEqual(networkContext.NonceRegistry);
expect(uninstallKey).toBe(freeBalanceETH.uninstallKey);
expect(appCfAddress).toBe(appIdentityToHash(freeBalanceETH.identity));
expect(appInstanceId).toBe(appIdentityToHash(freeBalanceETH.identity));
expect(assetType).toBe(freeBalanceETH.terms.assetType);
expect(limit).toEqual(freeBalanceETH.terms.limit);
expect(token).toBe(freeBalanceETH.terms.token);
Expand Down

0 comments on commit 4234063

Please sign in to comment.