-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
22 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
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'; |