Skip to content

Commit

Permalink
fix: fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
TiyoSheng committed Oct 31, 2023
1 parent 7bb5cd4 commit db79e6f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/client/src/mud/createSystemCalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export function createSystemCalls(

const selectUserNft = async (tokenId: any, address: any, nonce: any) => {
try {
const tx = await worldContract.write.selectUserNft([tokenId], {nonce});
const tx = await worldContract.write.selectUserNft([tokenId]);
await waitForTransaction(tx);
return getComponentValue(Player, encodeEntity({ addr: "address" }, { addr: address}));
} catch (error) {
Expand All @@ -95,7 +95,7 @@ export function createSystemCalls(

const selectLootNFT = async (tokenId: any, address: any, nonce: any) => {
try {
const tx = await worldContract.write.selectLootNFT([tokenId], {nonce});
const tx = await worldContract.write.selectLootNFT([tokenId]);
await waitForTransaction(tx);
let LootList1Data = getComponentValue(LootList1, encodeEntity({ addr: "address" }, { addr: address}));
// let LootList2Data = getComponentValue(LootList2, encodeEntity({ addr: "address" }, { addr: address}));
Expand Down
6 changes: 3 additions & 3 deletions packages/client/src/pages/game/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ const Game = () => {
player.username = player.name;
LootList1Data.forEach((item) => {
if (item.addr.toLocaleLowerCase() === address.toLocaleLowerCase()) {
let clothes = lootData.chest.replace(/"(.*?)"/, '').split(' of')[0].replace(/^\s+|\s+$/g,"")
let handheld = lootData.weapon.replace(/"(.*?)"/, '').split(' of')[0].replace(/^\s+|\s+$/g,"")
let head = lootData.head.replace(/"(.*?)"/, '').split(' of')[0].replace(/^\s+|\s+$/g,"")
let clothes = item.chest.replace(/"(.*?)"/, '').split(' of')[0].replace(/^\s+|\s+$/g,"")
let handheld = item.weapon.replace(/"(.*?)"/, '').split(' of')[0].replace(/^\s+|\s+$/g,"")
let head = item.head.replace(/"(.*?)"/, '').split(' of')[0].replace(/^\s+|\s+$/g,"")
player.equip = {
clothes,
handheld,
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/worlds.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"blockNumber": 29045674
},
"31337": {
"address": "0xD5724171C2b7f0AA717a324626050BD05767e2C6"
"address": "0x4000F8820522AC96C4221b299876e3e53bCc8525"
},
"421613": {
"address": "0x2Bc1034975c3df48D6f3026802f372677844b85d",
Expand Down

0 comments on commit db79e6f

Please sign in to comment.