Skip to content

Commit

Permalink
fix: bug in equality test
Browse files Browse the repository at this point in the history
  • Loading branch information
rsproule committed Jan 2, 2024
1 parent 7609ce6 commit 6c52279
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions frontend/src/components/tankGame/EventsStream.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ export async function getTankNameFromAddress(
player: Address
) {
// HACK: jonah forgot to set his name so we are mapping it here :eyeroll:
if (player === "0xc6d109eFf13844c1AE490Ed7e1dD46F56b337928") {
if (
player.toLowerCase() ===
"0xc6d109eFf13844c1AE490Ed7e1dD46F56b337928".toLowerCase()
) {
return "jonah-forgot-to-set-his-name";
}
let logs = await getLogs(address);
Expand Down Expand Up @@ -335,15 +338,11 @@ const startString = async () => {
};

const bountyString = async (address: Address, event: any) => {
return `🎯 ${
await getTankNameFromJoinIndex(
address,
event.args.hunter
)
} completed bounty on ${
await getTankNameFromJoinIndex(
address,
event.args.victim
)
} for ${ event.args.reward } APs.`;
return `🎯 ${await getTankNameFromJoinIndex(
address,
event.args.hunter
)} completed bounty on ${await getTankNameFromJoinIndex(
address,
event.args.victim
)} for ${event.args.reward} APs.`;
};

0 comments on commit 6c52279

Please sign in to comment.