Skip to content

Commit

Permalink
Changed fight contract functions name for backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
NindoK committed May 9, 2023
1 parent 033f431 commit 355ff79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions contracts/TokensManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ contract TokensManager is Initializable, AccessControlUpgradeable {

receive() external payable restricted {}

function fight(
function teamFight(
uint256[] calldata char,
uint32[] calldata target,
uint8[] calldata fightMultiplier
Expand Down Expand Up @@ -72,7 +72,7 @@ contract TokensManager is Initializable, AccessControlUpgradeable {
}
}

function singleFight(
function fight(
uint256 char,
uint32 target,
uint8 fightMultiplier
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/store/combat/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const combat = {
if (!TokensManager || !CryptoBlades || !rootState.defaultAccount) return;

const res = await TokensManager.methods
.singleFight(characterId, targetString, fightMultiplier)
.fight(characterId, targetString, fightMultiplier)
.send({
from: rootState.defaultAccount,
gasPrice: getGasPrice(),
Expand Down Expand Up @@ -227,7 +227,7 @@ const combat = {
}

const res = await TokensManager.methods
.fight(characters, targets, multiplier)
.teamFight(characters, targets, multiplier)
.send({
from: rootState.defaultAccount,
gasPrice: getGasPrice(),
Expand Down

0 comments on commit 355ff79

Please sign in to comment.