Skip to content

Commit

Permalink
feat: StreamUtilities now supports deposits with multiple input notes
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Apr 11, 2020
1 parent b4d5254 commit ed11bce
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/contracts/contracts/StreamUtilities.sol
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ library StreamUtilities {

function _processDeposit(
bytes memory _proof,
bytes memory proofSignature,
bytes memory _proofSignature,
address _aceContractAddress,
address _sender,
address _recipient,
Expand All @@ -65,7 +65,7 @@ library StreamUtilities {
.get(0);

// Extract notes used in proof
(bytes memory _proofInputNotes, bytes memory _proofOutputNotes, , ) = proofOutputs
(, bytes memory _proofOutputNotes, , ) = proofOutputs
.extractProofOutput();

// Ensure that there is only a single output note to avoid loss of funds
Expand Down Expand Up @@ -93,11 +93,12 @@ library StreamUtilities {
);

// Approve contract to spend stream note
IZkAsset(_tokenAddress).confidentialApprove(
_noteCoderToStruct(_proofInputNotes.get(0)).noteHash,
IZkAsset(_tokenAddress).approveProof(
JOIN_SPLIT_PROOF,
proofOutputs,
address(this),
true,
proofSignature
_proofSignature
);

// Send transfer
Expand Down

0 comments on commit ed11bce

Please sign in to comment.