Commit 124c6e6e authored by zeroleak's avatar zeroleak
Browse files

download CLI from code.samourai.io

parent b9be1994
......@@ -15,7 +15,9 @@ export const GUI_VERSION = version;
export const DEFAULT_CLI_LOCAL = true;
export const DEFAULT_CLIPORT = 8899;
export const VERSIONS_URL = "https://raw.githubusercontent.com/Samourai-Wallet/whirlpool-runtimes/master/CLI.json"
export const VERSIONS_URL = "https://code.samourai.io/whirlpool/whirlpool-runtimes/raw/master/CLI.json"
export const CLI_STABLE_URL = 'https://code.samourai.io/whirlpool/whirlpool-client-cli'
export const CLI_QA_URL = 'https://code.samourai.io/whirlpool/QA'
export const IPC_CLILOCAL = {
GET_STATE: 'cliLocal.getState',
......
import { APP_USERDATA, IS_DEV } from '../const';
import { APP_USERDATA, CLI_QA_URL, CLI_STABLE_URL, IS_DEV } from '../const';
import cliVersion from './cliVersion';
import { logger } from '../utils/logger';
import guiConfig from './guiConfig';
......@@ -67,11 +67,12 @@ export class CliApiService {
try {
let cliApi = await cliVersion.fetchCliApi(fetchVersion)
logger.info('Using CLI_API ' + fetchVersion, cliApi)
const projectUrl = fetchVersion === API_MODES.QA ? 'SamouraiDev/QA/releases/download/CLI-' + cliApi.CLI_VERSION : 'Samourai-Wallet/whirlpool-client-cli/releases/download/' + cliApi.CLI_VERSION
const filename = 'whirlpool-client-cli-' + cliApi.CLI_VERSION + '-run.jar'
const url = (fetchVersion === API_MODES.QA ? CLI_QA_URL : CLI_STABLE_URL) + cliApi.CLI_URL
return {
cliVersion: cliApi.CLI_VERSION,
filename: 'whirlpool-client-cli-' + cliApi.CLI_VERSION + '-run.jar',
url: 'https://github.com/'+projectUrl + '/whirlpool-client-cli-' + cliApi.CLI_VERSION + '-run.jar',
filename: filename,
url: url,
checksum: cliApi.CLI_CHECKSUM
}
} catch(e) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment