Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Valazan committed Sep 5, 2024
1 parent acda0b6 commit 4e7a7e4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions apps/backend/src/services/contracts.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ import { Submission } from '@/interfaces/submission.interface';
import { ecoEarnContract } from '@/utils/thor';
import { Service } from 'typedi';
import * as console from 'node:console';
import {unitsUtils} from "@vechain/sdk-core";
import {REWARD_AMOUNT} from "@config";
import { unitsUtils } from '@vechain/sdk-core';
import { REWARD_AMOUNT } from '@config';
@Service()
export class ContractsService {
public async registerSubmission(submission: Submission): Promise<boolean> {
let isSuccess = false;
try {
const result = await (await ecoEarnContract.transact.registerValidSubmission(submission.address, unitsUtils.parseUnits(REWARD_AMOUNT, "ether" ))).wait();
const result = await (
await ecoEarnContract.transact.registerValidSubmission(submission.address, unitsUtils.parseUnits(REWARD_AMOUNT, 'ether'))
).wait();
isSuccess = !result.reverted;
} catch (error) {
console.log('Error', error);
Expand Down

0 comments on commit 4e7a7e4

Please sign in to comment.