-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #152 from adrianvrj/dev
[feat] use jotai to store wallet address
- Loading branch information
Showing
8 changed files
with
84 additions
and
59 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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,37 @@ | ||
import { RpcProvider, constants } from "starknet" | ||
|
||
export const ETHTokenAddress = | ||
"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7" | ||
|
||
export const DAITokenAddress = | ||
"0x00da114221cb83fa859dbdb4c44beeaa0bb37c7537ad5ae66fe5e0efd20e6eb3" | ||
|
||
export const ARGENT_DUMMY_CONTRACT_ADDRESS = | ||
"0x001c515f991f706039696a54f6f33730e9b0e8cc5d04187b13c2c714401acfd4" | ||
|
||
export const CHAIN_ID = | ||
process.env.NEXT_PUBLIC_CHAIN_ID === constants.NetworkName.SN_MAIN | ||
? constants.NetworkName.SN_MAIN | ||
: constants.NetworkName.SN_SEPOLIA | ||
|
||
const NODE_URL = | ||
process.env.NEXT_PUBLIC_CHAIN_ID === constants.NetworkName.SN_MAIN | ||
? "https://starknet-mainnet.public.blastapi.io" | ||
: "https://starknet-sepolia.public.blastapi.io/rpc/v0_7" | ||
|
||
const STARKNET_CHAIN_ID = | ||
process.env.NEXT_PUBLIC_CHAIN_ID === constants.NetworkName.SN_MAIN | ||
? constants.StarknetChainId.SN_MAIN | ||
: constants.StarknetChainId.SN_SEPOLIA | ||
|
||
export const provider = new RpcProvider({ | ||
nodeUrl: NODE_URL, | ||
chainId: STARKNET_CHAIN_ID, | ||
}) | ||
|
||
export const ARGENT_SESSION_SERVICE_BASE_URL = | ||
process.env.NEXT_PUBLIC_ARGENT_SESSION_SERVICE_BASE_URL || | ||
"https://cloud.argent-api.com/v1" | ||
|
||
export const ARGENT_WEBWALLET_URL = | ||
process.env.NEXT_PUBLIC_ARGENT_WEBWALLET_URL || "https://web.argent.xyz" |
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,6 @@ | ||
import { atomWithReset } from "jotai/utils" | ||
import { StarknetWindowObject } from "starknetkit" | ||
|
||
export const walletStarknetkitLatestAtom = atomWithReset< | ||
StarknetWindowObject | null | undefined | ||
>(undefined) |