diff --git a/src/connectors/argentMobile/constants.ts b/src/connectors/argentMobile/constants.ts new file mode 100644 index 0000000..cfda51d --- /dev/null +++ b/src/connectors/argentMobile/constants.ts @@ -0,0 +1 @@ +export const DEFAULT_PROJECT_ID = "f2e613881f7a0e811295cdd57999e31b" diff --git a/src/connectors/argentMobile/index.ts b/src/connectors/argentMobile/index.ts index 6759a8d..d21edfc 100644 --- a/src/connectors/argentMobile/index.ts +++ b/src/connectors/argentMobile/index.ts @@ -4,7 +4,7 @@ import type { } from "get-starknet-core" import type { AccountInterface } from "starknet" import { constants } from "starknet" -import { DEFAULT_PROJECT_ID } from "../../constants" +import { DEFAULT_PROJECT_ID } from "./constants" import { ConnectorNotConnectedError, ConnectorNotFoundError, diff --git a/src/constants/index.ts b/src/connectors/injected/constants.ts similarity index 92% rename from src/constants/index.ts rename to src/connectors/injected/constants.ts index b12d846..c621231 100644 --- a/src/constants/index.ts +++ b/src/connectors/injected/constants.ts @@ -1,5 +1 @@ -export const DEFAULT_WEBWALLET_URL = "https://web.argent.xyz" - -export const DEFAULT_PROJECT_ID = "d7615e8fcbb3757ec0771a14ca715d09" - export const ARGENT_X_ICON = `data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIiByeD0iOCIgZmlsbD0iYmxhY2siLz4KPHBhdGggZD0iTTE4LjQwMTggNy41NTU1NkgxMy41OTgyQzEzLjQzNzcgNy41NTU1NiAxMy4zMDkxIDcuNjg3NDcgMTMuMzA1NiA3Ljg1MTQzQzEzLjIwODUgMTIuNDYwMyAxMC44NDg0IDE2LjgzNDcgNi43ODYwOCAxOS45MzMxQzYuNjU3MTEgMjAuMDMxNCA2LjYyNzczIDIwLjIxNjIgNi43MjIwMiAyM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A3LjczMjEzTDI2LjI5NSA4LjIzOTQ4QzI1Ljk4MTEgOC4zNDIxIDI1LjczNiA4LjU5NDA0IDI1LjYzOTMgOC45MTQwMkwyNS4xNjIxIDEwLjQ4ODVDMjUuMDk2MSAxMC43MDY1IDI0Ljc5MyAxMC43MDg4IDI0LjcyMzYgMTAuNDkyWiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==` diff --git a/src/connectors/webwallet/constants.ts b/src/connectors/webwallet/constants.ts new file mode 100644 index 0000000..99b24ab --- /dev/null +++ b/src/connectors/webwallet/constants.ts @@ -0,0 +1 @@ +export const DEFAULT_WEBWALLET_URL = "https://web.argent.xyz" diff --git a/src/connectors/webwallet/index.ts b/src/connectors/webwallet/index.ts index 17d5b63..3aa293e 100644 --- a/src/connectors/webwallet/index.ts +++ b/src/connectors/webwallet/index.ts @@ -13,8 +13,7 @@ import { UserRejectedRequestError, } from "../../errors" import { getWebWalletStarknetObject } from "./starknetWindowObject/getWebWalletStarknetObject" - -const DEFAULT_WEBWALLET_URL = "https://web.argent.xyz" +import { DEFAULT_WEBWALLET_URL } from "./constants" let _wallet: StarknetWindowObject | null = null diff --git a/src/helpers/getWallets.ts b/src/helpers/getWallets.ts index 497ef2e..cb417ef 100644 --- a/src/helpers/getWallets.ts +++ b/src/helpers/getWallets.ts @@ -1,5 +1,5 @@ import type { StarknetWindowObject, WalletProvider } from "get-starknet-core" -import { ARGENT_X_ICON } from "../constants" +import { ARGENT_X_ICON } from "../connectors/injected/constants" export const replaceArgentXIcon = async ( wallets: StarknetWindowObject[] | WalletProvider[], diff --git a/src/helpers/mapModalWallets.ts b/src/helpers/mapModalWallets.ts index b8a9973..9aeb4c0 100644 --- a/src/helpers/mapModalWallets.ts +++ b/src/helpers/mapModalWallets.ts @@ -1,6 +1,6 @@ import type { StarknetWindowObject, WalletProvider } from "get-starknet-core" import { Connector } from "../connectors/connector" -import { ARGENT_X_ICON } from "../constants" +import { ARGENT_X_ICON } from "../connectors/injected/constants" import type { ModalWallet, StoreVersion } from "../types/modal" interface SetConnectorsExpandedParams { diff --git a/src/main.ts b/src/main.ts index bb936a1..b83eb98 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,7 +3,7 @@ import sn from "get-starknet-core" import { getStoreVersionFromBrowser } from "./helpers/getStoreVersionFromBrowser" -import { DEFAULT_WEBWALLET_URL } from "./constants" +import { DEFAULT_WEBWALLET_URL } from "./connectors/webwallet/constants" import { defaultConnectors } from "./helpers/defaultConnectors" import { mapModalWallets } from "./helpers/mapModalWallets" import { resetWalletConnect } from "./helpers/resetWalletConnect"