frontend linting

This commit is contained in:
realaravinth
2021-10-08 15:24:29 +05:30
parent f7afc72d81
commit 53720ff740
91 changed files with 2158 additions and 1677 deletions

View File

@@ -9,19 +9,19 @@
* MIT or <http://www.apache.org/licenses/LICENSE-2.0> for Apache.
*/
import genJsonPayload from './utils/genJsonPayload';
import * as CONST from './const';
import {Work} from './prove';
import genJsonPayload from "../../utils/genJsonPayload";
import * as CONST from "./const";
import {Work} from "./prove";
export type Token = {
token: string;
};
export const sendWork = async (payload: Work) => {
export const sendWork = async (payload: Work): Promise<Token> => {
try {
const res = await fetch(CONST.ROUTES.verififyPoW, genJsonPayload(payload));
if (res.ok) {
console.debug('work verified');
console.debug("work verified");
const token: Token = await res.json();
console.debug(`token ${token.token}`);
return token;