Skip to content

Commit

Permalink
chore: update omni, use omniChainId internal view
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhalliday committed Aug 26, 2024
1 parent e9aee28 commit 4e6a0e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/omni
Submodule omni updated 407 files
8 changes: 4 additions & 4 deletions src/XStaker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {XStakeController} from "./XStakeController.sol";
*
* In scenario 1, our XStakeController will view this user as staked, but
* the user will still cutsody their tokens on the source.
8
* 8
* In scenario 2, the XStaker will take cutsody of the user's tokens, but
* the XStakeController will not recognize the user as staked.
*
Expand Down Expand Up @@ -67,7 +67,7 @@ contract XStaker is XApp {
require(token.transferFrom(msg.sender, address(this), amount), "XStaker: transfer failed");

uint256 fee = xcall({
destChainId: omni.omniChainId(),
destChainId: omniChainId(),
conf: confLevel,
to: controller,
data: abi.encodeCall(XStakeController.recordStake, (msg.sender, amount)),
Expand All @@ -83,7 +83,7 @@ contract XStaker is XApp {
*/
function stakeFee(uint256 amount) public view returns (uint256) {
return feeFor({
destChainId: omni.omniChainId(),
destChainId: omniChainId(),
data: abi.encodeCall(XStakeController.recordStake, (msg.sender, amount)),
gasLimit: GasLimits.RecordStake
});
Expand All @@ -95,7 +95,7 @@ contract XStaker is XApp {
*/
function withdraw(address to, uint256 amount) external xrecv {
require(isXCall(), "XStaker: only xcall");
require(xmsg.sourceChainId == omni.omniChainId(), "XStaker: only omni");
require(xmsg.sourceChainId == omniChainId(), "XStaker: only omni");
require(xmsg.sender == controller, "XStaker: only controller");
require(token.transfer(to, amount), "XStaker: transfer failed");
}
Expand Down

0 comments on commit 4e6a0e1

Please sign in to comment.