Skip to content

Commit

Permalink
Test self fund sepolia
Browse files Browse the repository at this point in the history
  • Loading branch information
broody committed Jul 15, 2024
1 parent c73f040 commit 402dfcd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
5 changes: 4 additions & 1 deletion packages/keychain/src/components/DeploymentRequired.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ export function DeploymentRequired({
return;
}

if (account.chainId === constants.StarknetChainId.SN_MAIN) {
if (
account.chainId === constants.StarknetChainId.SN_MAIN ||
account.chainId === constants.StarknetChainId.SN_SEPOLIA
) {
setIsFundingRequired(true);
return;
}
Expand Down
9 changes: 3 additions & 6 deletions packages/keychain/src/components/Execute/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,9 @@ export function Execute() {

// TODO: calculate webauthn validation cost separately
const maxFee = num.toHex(ctx.transactionsDetail?.maxFee || ETH_MIN_PREFUND);
const { transaction_hash } = await account.execute(
calls,
{
maxFee,
},
);
const { transaction_hash } = await account.execute(calls, {
maxFee,
});
ctx.resolve({
transaction_hash,
code: ResponseCodes.SUCCESS,
Expand Down
11 changes: 5 additions & 6 deletions packages/keychain/src/components/connect/Signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ import { useControllerTheme } from "hooks/theme";
import { useConnection } from "hooks/connection";
import { useDebounce } from "hooks/debounce";
import { ErrorAlert } from "components/ErrorAlert";
import { useDeploy } from "hooks/deploy";
import { constants } from "starknet";
//import { useDeploy } from "hooks/deploy";

export function Signup({
prefilledName = "",
Expand Down Expand Up @@ -54,7 +53,7 @@ export function Signup({

function Form({ isSlot, onLogin, onSuccess }: SignupProps) {
const { chainId, rpcUrl, setController } = useConnection();
const { deployRequest } = useDeploy();
//const { deployRequest } = useDeploy();
const { values, errors, setErrors, setTouched } =
useFormikContext<FormValues>();
const [error, setError] = useState<Error>();
Expand Down Expand Up @@ -95,9 +94,9 @@ function Form({ isSlot, onLogin, onSuccess }: SignupProps) {
refetchInterval: (data) => (!data ? 1000 : undefined),
onSuccess: async (data) => {
try {
if (chainId !== constants.StarknetChainId.SN_MAIN) {
await deployRequest(values.username);
}
// if (chainId !== constants.StarknetChainId.SN_MAIN) {
// await deployRequest(values.username);
// }

const {
account: {
Expand Down

0 comments on commit 402dfcd

Please sign in to comment.