-
Mateusz Tyszczak authoredMateusz Tyszczak authored
snap.ts 856 B
/**
* The snap origin to use.
* Will default to the local hosted snap if no value is provided in environment.
*
* You may be tempted to change this to the URL where your production snap is hosted, but please
* don't. Instead, rename `.env.production.dist` to `.env.production` and set the production URL
* there. Running `yarn build` will automatically use the production environment variables.
*/
export const defaultSnapOrigin = import.meta.env.VITE_SNAP_ORIGIN || `npm:@hiveio/metamask-snap`; // local:http://localhost:8080
export const defaultSnapVersion: string | undefined = import.meta.env.VITE_SNAP_VERSION ?? '1.3.3';
/**
* Check if a snap ID is a local snap ID.
*
* @param snapId - The snap ID.
* @returns True if it's a local Snap, or false otherwise.
*/
export const isLocalSnap = (snapId: string) => snapId.startsWith('local:');