Skip to content

Commit

Permalink
Update consts.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-1979 committed Dec 5, 2023
1 parent f2c088f commit c4c8b7b
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions packages/dapp/src/util/consts.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,12 @@
import { getLatestPackageVersion } from "./getLatestPackageVersion";

let SNAP_VERSION = '>=0.1.5';

// Example usage
const packageName = '@polkagate/snap';
getLatestPackageVersion(packageName)
.then((latestVersion) => {
SNAP_VERSION = latestVersion;
console.log(`Latest version of ${packageName}: ${latestVersion}`);
})
.catch((error) => {
console.error('Failed to get the latest version:', error);
});

// const LOCAL_SNAP_ID = 'local:http://localhost:8080';
const SNAP_VERSION = '>=0.1.5';
const LOCAL_SNAP_ID = 'local:http://localhost:8080';
const NPM_SNAP_ID = 'npm:@polkagate/snap';

// export const POLKAMASK_SNAP_IDS = [LOCAL_SNAP_ID, NPM_SNAP_ID]

export const DEFAULT_SNAP_ORIGIN =
process.env.SNAP_ORIGIN ?? NPM_SNAP_ID;
// process.env.SNAP_ORIGIN ?? LOCAL_SNAP_ID;
export const DEFAULT_SNAP_ORIGIN = process.env.REACT_APP_MODE === 'production' ? NPM_SNAP_ID : LOCAL_SNAP_ID;

export const SUPPORTED_SNAPS = {
[DEFAULT_SNAP_ORIGIN]: { version: SNAP_VERSION },
// 'npm:@chainsafe/polkadot-snap': {},
};

export const POLKAMASK_ACCOUNT_META_SOURCE = 'polkamask'
export const POLKAMASK_ACCOUNT_META_SOURCE = 'polkamask';

0 comments on commit c4c8b7b

Please sign in to comment.