Skip to content

Commit

Permalink
Hide mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
broody committed May 17, 2024
1 parent 9e9d369 commit b2e7a6c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
20 changes: 10 additions & 10 deletions examples/starknet-react-next/src/components/StarknetProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ export function StarknetProvider({ children }: PropsWithChildren) {
);
}

const url =
!process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL || process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL.split(".")[0] === "cartridge-starknet-react-next"
? process.env.XFRAME_URL
: "https://" +
(process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL ?? "").replace(
"cartridge-starknet-react-next",
"keychain",
)
const url = "https://x.cartridge.gg";
// !process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL || process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL.split(".")[0] === "cartridge-starknet-react-next"
// ? process.env.XFRAME_URL
// : "https://" +
// (process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL ?? "").replace(
// "cartridge-starknet-react-next",
// "keychain",
// )

const connectors = [
new CartridgeConnector(
Expand All @@ -56,8 +56,8 @@ const connectors = [
dark: "red",
light: "green",
},
}
},
},
}
},
) as never as Connector,
];
6 changes: 3 additions & 3 deletions examples/starknet-react-next/src/components/TransferEth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const ETH_CONTRACT =
"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7";

export const TransferEth = () => {
const [chainId, setChainId] = useState<constants.StarknetChainId>(
const [chainId] = useState<constants.StarknetChainId>(
constants.StarknetChainId.SN_SEPOLIA,
);
const { account } = useAccount();
Expand Down Expand Up @@ -112,7 +112,7 @@ export const TransferEth = () => {
<>
<h2>Transfer Eth</h2>
<p>Address: {ETH_CONTRACT}</p>
<div style={{ marginBottom: "10px" }}>
{/* <div style={{ marginBottom: "10px" }}>
<input
type="radio"
id="testnet"
Expand All @@ -134,7 +134,7 @@ export const TransferEth = () => {
}
/>
<label htmlFor="mainnet">Mainnet</label>
</div>
</div> */}
<button onClick={() => execute005()}>Transfer 0.005 ETH to self</button>
<button style={{ marginLeft: "10px" }} onClick={() => executePointOne()}>
Transfer 0.1 ETH to self
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/src/utils/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default class Controller {
credentialId,
publicKey,
this.session(
"http://localhost:3002",
"https://cartridge-starknet-react-next-git-test-d.preview.cartridge.gg",
constants.StarknetChainId.SN_SEPOLIA,
),
),
Expand Down

0 comments on commit b2e7a6c

Please sign in to comment.