Skip to content

Commit

Permalink
Merge pull request #22 from DIG-Network/release/v0.0.1-alpha.24
Browse files Browse the repository at this point in the history
Release/v0.0.1 alpha.24
  • Loading branch information
MichaelTaylor3D authored Sep 26, 2024
2 parents cdadf1f + 9f540f6 commit fb9f07b
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 14 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.24](https://github.com/DIG-Network/dig-incentive-server/compare/v0.0.1-alpha.23...v0.0.1-alpha.24) (2024-09-26)

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

### [0.0.1-alpha.22](https://github.com/DIG-Network/dig-incentive-server/compare/v0.0.1-alpha.21...v0.0.1-alpha.22) (2024-09-26)
Expand Down
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-incentive-server",
"version": "0.0.1-alpha.23",
"version": "0.0.1-alpha.24",
"description": "",
"type": "commonjs",
"main": "./dist/index.js",
Expand All @@ -24,7 +24,7 @@
"LICENSE"
],
"dependencies": {
"@dignetwork/dig-sdk": "^0.0.1-alpha.92",
"@dignetwork/dig-sdk": "^0.0.1-alpha.95",
"async-mutex": "^0.5.0",
"chia-server-coin": "^0.0.5",
"datalayer-driver": "^0.1.21",
Expand Down
3 changes: 2 additions & 1 deletion src/tasks/payouts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
DigChallenge,
DataStore,
getStoresList,
Environment
} from "@dignetwork/dig-sdk";
import { Mutex } from "async-mutex";
import { IncentiveProgram } from "../utils/IncentiveProgram";
Expand Down Expand Up @@ -36,7 +37,7 @@ const runIncentiveProgram = async (
currentEpoch: number
): Promise<void> => {
try {
if (!process.env.DIG_FOLDER_PATH) {
if (!Environment.DIG_FOLDER_PATH) {
throw new Error("DIG_FOLDER_PATH environment variable not set.");
}

Expand Down
6 changes: 3 additions & 3 deletions src/tasks/subscriber.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import _ from "lodash";
import { Task, SimpleIntervalJob } from "toad-scheduler";
import { STORE_PATH, DataStore, NconfManager, DigNetwork } from "@dignetwork/dig-sdk";
import { STORE_PATH, DataStore, NconfManager, DigNetwork, Environment } from "@dignetwork/dig-sdk";
import { Mutex } from "async-mutex";
import { IncentiveProgram } from "../utils/IncentiveProgram";
import fs from "fs";
Expand Down Expand Up @@ -29,8 +29,8 @@ const runSubscriber = async (): Promise<void> => {
let totalDiskSpace = await DataStore.getTotalDiskSpace();

// Cast DISK_SPACE_LIMIT to bigint
const diskSpaceLimit = process.env.DISK_SPACE_LIMIT
? BigInt(process.env.DISK_SPACE_LIMIT)
const diskSpaceLimit = Environment.DISK_SPACE_LIMIT_BYTES
? BigInt(Environment.DISK_SPACE_LIMIT_BYTES)
: null;

let subscriptionMade = false;
Expand Down
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.");
Expand Down

0 comments on commit fb9f07b

Please sign in to comment.