Skip to content

Commit

Permalink
fix missing variables and other typos
Browse files Browse the repository at this point in the history
  • Loading branch information
feruzm committed Jul 22, 2024
1 parent edbca4a commit b3d1886
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/server/handlers/hive-explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const fetchGlobalProps = async () => {

return globalProps;
} catch (e) {
throw new Error("Failed to get globalProps", e)
throw new Error("Failed to get globalProps")
}
};

Expand All @@ -74,6 +74,6 @@ export const getAccount = async (username: string) => {


} catch (error) {
throw new Error("Failed to get account data", error)
throw new Error("Failed to get account data")
}
}
8 changes: 4 additions & 4 deletions src/server/handlers/wallet-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { EngineContracts, EngineIds, EngineMetric, EngineRequestPayload, EngineT
import { convertEngineToken } from "../../models/converters";

//docs: https://hive-engine.github.io/engine-docs/
const BASE_URL = 'https://api2.hive-engine.com';//'https://api2.hive-engine.com';
const BASE_ENGINE_URL = 'https://api2.hive-engine.com';//'https://api2.hive-engine.com';
const BASE_SPK_URL = 'https://spk.good-karma.xyz';

const ENGINE_REWARDS_URL = 'https://scot-api.hive-engine.com/';
Expand Down Expand Up @@ -138,7 +138,7 @@ export const fetchEngineMetics = async (tokens: string[]): Promise<EngineMetric[

return response.data.result;
}



//portfolio compilation methods
Expand Down Expand Up @@ -196,11 +196,11 @@ export const portfolio = async (req: express.Request, res: express.Response) =>
const _userdata = await getAccount(username);

//fetch points data
//TODO: put back api request
//TODO: put back api request
// const _marketData = await apiRequest(`market-data/latest`, "GET");
const _marketData = await dummyMarketData()

//TODO: put back api request
//TODO: put back api request
// const _pointsData =await apiRequest(`users/${username}`, "GET");
const _pointsData = await dummyPointSummary()

Expand Down
4 changes: 2 additions & 2 deletions src/server/util.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SMTAsset } from "@hiveio/dhive";
import {Asset, SMTAsset} from "@hiveio/dhive";
import axios, {AxiosRequestConfig, AxiosResponse, Method} from "axios";

import express from "express";
Expand Down Expand Up @@ -27,7 +27,7 @@ export const baseApiRequest = (url: string, method: Method, headers: any = {}, p
}


export const parseToken = (strVal: string | SMTAsset) => {
export const parseToken = (strVal: string) => {
// checks if first part of string is float
const regex = /^\-?[0-9]+(e[0-9]+)?(\.[0-9]+)? .*$/;
if (!regex.test(strVal)) {
Expand Down

0 comments on commit b3d1886

Please sign in to comment.