-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: paymaster * fixing build * fixing build * fixing build * additional testing * fixing paymaster for deployed wallets * fixing execute * fixing paymaster * fixing paymaster for argent
- Loading branch information
1 parent
c15caf3
commit 29f2323
Showing
10 changed files
with
3,017 additions
and
2,400 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { mainnet } from "@starknet-react/chains"; | ||
import { bigintToStringHex } from "@/utils/stringService"; | ||
import { sepolia } from "@starknet-react/chains"; | ||
import { useNetwork } from "@starknet-react/core"; | ||
import { useEffect, useState } from "react"; | ||
|
||
const useIsWrongNetwork = () => { | ||
const { chain } = useNetwork(); | ||
const [isWrongNetwork, setIsWrongNetwork] = useState<boolean>(false); | ||
|
||
useEffect(() => { | ||
setIsWrongNetwork( | ||
process.env.NEXT_PUBLIC_IS_TESTNET === "true" | ||
? bigintToStringHex(chain.id) === bigintToStringHex(mainnet.id) | ||
: bigintToStringHex(chain.id) === bigintToStringHex(sepolia.id) | ||
); | ||
}, [chain]); | ||
|
||
return { | ||
isWrongNetwork, | ||
setIsWrongNetwork, | ||
}; | ||
}; | ||
|
||
export default useIsWrongNetwork; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.