Skip to content

Commit

Permalink
Showing 5 changed files with 15 additions and 12 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,8 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [0.0.1-alpha.75](https://github.com/DIG-Network/dig-propagation-server/compare/v0.0.1-alpha.74...v0.0.1-alpha.75) (2024-09-26)

### [0.0.1-alpha.74](https://github.com/DIG-Network/dig-propagation-server/compare/v0.0.1-alpha.73...v0.0.1-alpha.74) (2024-09-26)


12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dig-propagation-server",
"version": "0.0.1-alpha.74",
"version": "0.0.1-alpha.75",
"description": "",
"type": "commonjs",
"main": "./dist/index.js",
@@ -25,7 +25,7 @@
"LICENSE"
],
"dependencies": {
"@dignetwork/dig-sdk": "^0.0.1-alpha.90",
"@dignetwork/dig-sdk": "^0.0.1-alpha.95",
"async-mutex": "^0.5.0",
"busboy": "^1.6.0",
"chia-server-coin": "^0.0.5",
5 changes: 3 additions & 2 deletions src/utils/authUtils.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import {HttpError } from "./HttpError";
import { Environment } from "@dignetwork/dig-sdk";

export const getCredentials = async () => {
const username = process.env.DIG_USERNAME;
const password = process.env.DIG_PASSWORD;
const username = Environment.DIG_USERNAME;
const password = Environment.DIG_PASSWORD;

if (!username || !password) {
throw new HttpError(500, "Propagation Server does not have credentials set, please add them to the ENV to use this feature.");
4 changes: 2 additions & 2 deletions src/utils/storage.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import os from "os";
import path from "path";
import fs from "fs";
import { Environment } from "@dignetwork/dig-sdk";

export const getStorageLocation = (): string => {
// If DIG_STORAGE_LOCATION is set, use it; otherwise, fallback to the default location
const dir =
process.env.DIG_FOLDER_PATH || path.join(os.homedir(), ".dig");
const dir = Environment.DIG_FOLDER_PATH || path.join(os.homedir(), ".dig");
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir, { recursive: true });
}

0 comments on commit 8e02cf2

Please sign in to comment.