Skip to content

Commit

Permalink
Fix update config (#390)
Browse files Browse the repository at this point in the history
* fix update config
  • Loading branch information
notV4l authored Nov 17, 2024
1 parent 2a114c5 commit 12d28ef
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
7 changes: 4 additions & 3 deletions web/src/components/wallet/StarknetProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ export function customJsonRpcProvider(selectedChain: DojoChainConfig): ChainProv
function getConnectorsForChain(selectedChain: DojoChainConfig, path: string) {
const controller = cartridgeConnector({ selectedChain });

if (path.startsWith("/admin")) {
return [controller, argent()];
}


switch (selectedChain.name) {
case "KATANA":
Expand All @@ -60,6 +58,9 @@ function getConnectorsForChain(selectedChain: DojoChainConfig, path: string) {

default:
// const controller = cartridgeConnector({ selectedChain });
if (path.startsWith("/admin")) {
return [controller, argent()];
}
return [controller];
}
}
Expand Down
13 changes: 12 additions & 1 deletion web/src/dojo/hooks/useSystems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,18 @@ export const useSystems = (): SystemsInterface => {
const { hash } = await executeAndReceipt({
contractName: `ryo`,
entrypoint: "update_ryo_config",
calldata: [ryoConfig],
calldata: CallData.compile({
key: 0, // ignored in contract
initialized: 0, // ignored in contract
paused: 0, // ignored in contract
season_version: 0, // ignored in contract
season_duration: ryoConfig.season_duration,
season_time_limit: ryoConfig.season_time_limit,
paper_fee: ryoConfig.paper_fee,
paper_reward_launderer: ryoConfig.paper_reward_launderer,
treasury_fee_pct: ryoConfig.treasury_fee_pct,
treasury_balance: 0, // ignored in contract
}),
});

return {
Expand Down

0 comments on commit 12d28ef

Please sign in to comment.