Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fixed fuel wallet plant seed issue #94

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions frontend/src/components/modals/PlantModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
return () => {
window.removeEventListener("keydown", handleGlobalKeyDown);
};
}, [status, showNoFunds, seeds]);

Check warning on line 68 in frontend/src/components/modals/PlantModal.tsx

View workflow job for this annotation

GitHub Actions / Lint

React Hook useEffect has a missing dependency: 'handlePlant'. Either include it or remove the dependency array

async function plantWithoutGasStation() {
if (!wallet || !contract) throw new Error("Wallet or contract not found");
Expand All @@ -76,10 +76,7 @@
bits: Address.fromAddressOrString(wallet.address.toString()).toB256(),
},
};
const resources = await wallet.getResourcesToSpend([
{ amount: 100000, assetId: dollarFarmAssetID },
]);
console.log("resources", resources);

const balance = Number(await wallet.getBalance(dollarFarmAssetID));

let tx;
Expand All @@ -96,6 +93,7 @@
})
.call();
} else {
console.log("planting without gas station");
// Otherwise, use plant_seed_at_index
tx = await contract.functions
.plant_seed_at_index(seedType, tileArray[0], addressIdentityInput)
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/show/ShowPlayerInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export default function ShowPlayerInfo({
setBalance(balanceinBN?.toString());
})();
}, [wallet]);
console.log("balance", balance);

return (
<Box css={styles.playerInfo}>
Expand Down
2 changes: 1 addition & 1 deletion frontend/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",
"noEmitOnError": false,
// "noEmitOnError": false,
/* Linting */
"strict": true,
"noUnusedLocals": false,
Expand Down
1 change: 1 addition & 0 deletions frontend/tsconfig.app.tsbuildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"root":["./src/app.tsx","./src/constants.ts","./src/main.tsx","./src/vite-env.d.ts","./src/components/background.tsx","./src/components/camera.tsx","./src/components/game.tsx","./src/components/garden.tsx","./src/components/gardentile.tsx","./src/components/loading.tsx","./src/components/mobilecontrols.tsx","./src/components/newplayer.tsx","./src/components/player.tsx","./src/components/home/home.tsx","./src/components/home/instructions.tsx","./src/components/modals/buyseeds.tsx","./src/components/modals/harvestmodal.tsx","./src/components/modals/marketmodal.tsx","./src/components/modals/nofundsmessage.tsx","./src/components/modals/plantmodal.tsx","./src/components/modals/sellitem.tsx","./src/components/modals/unsupportedwalletsnoticemodal.tsx","./src/components/show/githubrepo.tsx","./src/components/show/info.tsx","./src/components/show/inventory.tsx","./src/components/show/showcoins.tsx","./src/components/show/showplayerinfo.tsx","./src/components/show/walletinfo.tsx","./src/components/toast/toasticons.tsx","./src/hooks/usepaymaster.ts","./src/hooks/usewalletfunds.ts","./src/sway-api/index.ts","./src/sway-api/contracts/farmcontract.ts","./src/sway-api/contracts/farmcontractfactory.ts","./src/sway-api/contracts/common.d.ts","./src/sway-api/contracts/index.ts"],"version":"5.6.3"}
2 changes: 1 addition & 1 deletion frontend/tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
"noEmitOnError": false,
// "noEmitOnError": false,

/* Linting */
"strict": true,
Expand Down
1 change: 1 addition & 0 deletions frontend/tsconfig.node.tsbuildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"root":["./vite.config.ts"],"version":"5.6.3"}
Loading