Skip to content

Commit

Permalink
fixed unstake/restake parameter ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
aalavandhan committed Dec 20, 2024
1 parent 2d692ba commit 034aa69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions contracts/Router/GeyserRouter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ contract GeyserRouter is IERC721Receiver {
}

function unstakeAndRestake(UnstakeRequest calldata r1, StakeRequest calldata r2) external {
IGeyser(r1.geyser).stake(r1.vault, r1.amount, r1.permission);
IGeyser(r2.geyser).unstakeAndClaim(r2.vault, r2.amount, r2.permission);
IGeyser(r1.geyser).unstakeAndClaim(r1.vault, r1.amount, r1.permission);
IGeyser(r2.geyser).stake(r2.vault, r2.amount, r2.permission);
}
}
4 changes: 2 additions & 2 deletions test/GeyserRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@ describe('GeyserRouter', function () {

await expect(router.unstakeAndRestake(r1, r2))
.to.emit(geyser, 'Staked')
.withArgs(vault1, amount1, '0x')
.and.to.emit(geyser, 'UnstakedAndClaimed')
.withArgs(vault2, amount2, '0x')
.and.to.emit(geyser, 'UnstakedAndClaimed')
.withArgs(vault1, amount1, '0x')
})
})
})

0 comments on commit 034aa69

Please sign in to comment.