Skip to content

Commit

Permalink
chore: Fix dependency errors
Browse files Browse the repository at this point in the history
  • Loading branch information
josipbagaric committed Sep 12, 2022
1 parent 1cd84b4 commit 0648290
Show file tree
Hide file tree
Showing 14 changed files with 6,352 additions and 8,702 deletions.
4 changes: 2 additions & 2 deletions apps/backend/src/purchases/dto/full-purchase.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ export class FullPurchaseDto {
reportingStart: Date;

@ApiPropertyOptional({ example: 180 })
reportingStartTimezoneOffset;
reportingStartTimezoneOffset: number;

@ApiPropertyOptional({ example: '2020-12-31T23:59:59.999Z' })
reportingEnd: Date;

@ApiPropertyOptional({ example: 180 })
reportingEndTimezoneOffset;
reportingEndTimezoneOffset: number;

@ApiProperty({ example: 'Decarbonizing Filecoin Mining Operation' })
purpose: string;
Expand Down
2 changes: 1 addition & 1 deletion apps/backend/src/purchases/purchases.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export class PurchasesService {
purchaseId: newPurchase.id,
previousTx: transferTxHash
});
await this.prisma.purchase.update({
await prisma.purchase.update({
where: {
id: newPurchase.id
},
Expand Down
3 changes: 1 addition & 2 deletions apps/frontend/src/components/HomePage/AdvisorsBlock.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import useMediaQuery from "@mui/material/useMediaQuery";
import { Theme } from "@mui/system/createTheme/createTheme";
import { styled } from "@mui/material/styles"
import { styled, Theme } from "@mui/material/styles"
import Box from "@mui/material/Box"
import Grid from "@mui/material/Grid"
import Typography from "@mui/material/Typography"
Expand Down
5 changes: 2 additions & 3 deletions apps/tokenization/src/account/account.service.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { BlockchainPropertiesService } from '@zero-labs/tokenization-api';
import { InjectRepository } from '@nestjs/typeorm';
import { ConfigService } from '@nestjs/config';
import { Wallet, utils } from 'ethers';
import { Wallet, utils, providers } from 'ethers';
import { CertificateRegistryExtended__factory } from '@zero-labs/tokenization';
import { getProviderWithFallback } from '@energyweb/utils-general';

import { Repository } from 'typeorm';
import { AccountDTO } from './account.dto';
Expand All @@ -24,7 +23,7 @@ export class AccountService {
const totalAccounts = await this.repository.count();

const { registry, rpcNode } = await this.blockchainPropertiesService.get();
const provider = getProviderWithFallback(rpcNode);
const provider = new providers.JsonRpcProvider(rpcNode);
const issuerAccount = await this.signerService.get();

const minBalanceNeeded = utils.parseEther(
Expand Down
6 changes: 3 additions & 3 deletions apps/tokenization/src/account/get-signer.service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Connection } from 'typeorm';
import { Injectable, NotFoundException } from '@nestjs/common';
import { Wallet } from 'ethers';
import { BlockchainPropertiesService, decrypt, getProviderWithFallback } from '@zero-labs/tokenization-api';
import { providers, Wallet } from 'ethers';
import { BlockchainPropertiesService, decrypt } from '@zero-labs/tokenization-api';

@Injectable()
export class SignerService {
Expand All @@ -12,7 +12,7 @@ export class SignerService {

public async get(): Promise<Wallet> {
const { rpcNode } = await this.blockchainPropertiesService.get();
const provider = getProviderWithFallback(rpcNode);
const provider = new providers.JsonRpcProvider(rpcNode);

const queryRunner = this.connection.createQueryRunner();

Expand Down
5 changes: 1 addition & 4 deletions apps/tokenization/src/agreement/agreement.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,11 @@ import {
ApiSecurity,
ApiTags,
} from '@nestjs/swagger';
import { AgreementDTO, AgreementService, BlockchainPropertiesService, CreateAgreementDTO, SignAgreementDTO, TransactionHash } from '@zero-labs/tokenization-api';
import { AgreementDTO, AgreementService, BlockchainPropertiesService, CreateAgreementDTO, SignAgreementDTO, TransactionHash, InvalidateAgreementDTO, UpdateAgreementAmountDTO, UpdateAgreementMetadataDTO } from '@zero-labs/tokenization-api';
import { providers, Wallet } from 'ethers';
import { signAgreement } from '@zero-labs/tokenization';
import { AccountService } from '../account/account.service';
import { IssuerGuard } from '../auth/issuer.guard';
import { InvalidateAgreementDTO } from '@zero-labs/tokenization-api/dist/src/pods/agreement/dto/invalidate-agreement.dto';
import { UpdateAgreementAmountDTO } from '@zero-labs/tokenization-api/dist/src/pods/agreement/dto/update-amount.dto';
import { UpdateAgreementMetadataDTO } from '@zero-labs/tokenization-api/dist/src/pods/agreement/dto/update-metadata.dto';

@ApiTags('agreement')
@Controller('agreement')
Expand Down
2 changes: 1 addition & 1 deletion apps/tokenization/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const storageAdapter = new PostgresTypeORMAdapter();
.valid('development', 'production', 'test')
.default('development'),
SUPERADMIN_API_KEY: Joi.string().required(),
TOKENIZATION_PORT: Joi.number().default(3334),
PORT: Joi.number().default(3334),
LOG_LEVELS: Joi.string().default('log,error,warn,debug,verbose'),
WEB3: Joi.string().default('http://localhost:8545'),
USER_MNEMONIC: Joi.string().required(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { DynamicModule, Module } from '@nestjs/common'
import { DynamicModule, Module } from '@nestjs/common';
import { ScheduleModule } from '@nestjs/schedule';
import { BlockchainPropertiesService, IStorageAdapter } from '@zero-labs/tokenization-api';
import { BlockchainPropertiesController } from './blockchain-properties.controller';

Expand All @@ -8,6 +9,7 @@ export class BlockchainPropertiesModule {
return {
module: BlockchainPropertiesModule,
controllers: [BlockchainPropertiesController],
imports: [ScheduleModule.forRoot()],
providers: [
{
provide: 'STORAGE_ADAPTER',
Expand Down
2 changes: 1 addition & 1 deletion apps/tokenization/src/watcher/watcher.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { DynamicModule, Module } from '@nestjs/common';
import { BullModule } from '@nestjs/bull';
import { CqrsModule } from '@nestjs/cqrs';
import { ScheduleModule } from '@nestjs/schedule';
import { IStorageAdapter, OnChainEventProcessor, OnChainEventWatcher } from '@zero-labs/tokenization-api';

import { AgreementModule } from '../agreement';
import { IStorageAdapter, OnChainEventWatcher, OnChainEventProcessor } from '@zero-labs/tokenization-api';
import { BlockchainPropertiesModule } from '../blockchain/blockchain-properties.module';
import { CertificateModule } from '../certificate/certificate.module';
import { BatchModule } from '../batch/batch.module';
Expand Down
2 changes: 1 addition & 1 deletion libs/ui/components/src/FormDatePicker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const FormDatePicker: FC<FormDatePickerProps> = ({
value={value ?? null}
inputFormat={'MMM DD, YYYY'}
components={{ OpenPickerIcon: CalendarIcon }}
renderInput={(props) => (
renderInput={(props: any) => (
<TextField
{...props}
name={name}
Expand Down
92 changes: 49 additions & 43 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,14 @@
"@emotion/server": "11.10.0",
"@emotion/styled": "11.10.4",
"@energyweb/origin-backend-utils": "1.8.3",
"@energyweb/utils-general": "11.2.3",
"@energyweb/utils-general": "11.2.1",
"@ethersproject/bignumber": "5.7.0",
"@ethersproject/constants": "5.7.0",
"@mui/icons-material": "5.2.5",
"@mui/lab": "5.0.0-alpha.62",
"@mui/material": "5.2.6",
"@mui/styles": "5.2.3",
"@mui/icons-material": "5.10.3",
"@mui/lab": "5.0.0-alpha.98",
"@mui/material": "5.10.4",
"@mui/system": "5.10.4",
"@mui/styles": "5.10.3",
"@nestjs-modules/mailer": "1.8.1",
"@nestjs/bull": "0.6.1",
"@nestjs/common": "9.0.11",
Expand All @@ -75,8 +76,9 @@
"@nestjs/typeorm": "9.0.1",
"@prisma/client": "4.3.1",
"@t00nday/nestjs-pdf": "3.0.5",
"@tanstack/react-query": "4.2.3",
"@zero-labs/tokenization": "1.0.0",
"@zero-labs/tokenization-api": "1.0.0",
"@zero-labs/tokenization-api": "1.0.2",
"assert": "2.0.0",
"axios": "0.27.2",
"buffer": "6.0.3",
Expand All @@ -88,74 +90,75 @@
"d3": "7.6.1",
"d3-sankey": "0.12.3",
"dayjs": "1.11.5",
"ethers": "5.3.1",
"ethers": "5.7.0",
"formik": "2.2.9",
"history": "5.3.0",
"htmling": "0.0.8",
"joi": "17.6.0",
"lodash": "4.17.21",
"luxon": "3.0.3",
"next": "12.0.7",
"next": "12.2.5",
"os-browserify": "0.3.0",
"passport": "0.6.0",
"passport-headerapikey": "1.2.2",
"polly-js": "1.8.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-dropzone": "11.7.1",
"react-helmet-async": "1.3.0",
"react-query": "3.34.7",
"react-router": "6.3.0",
"react-router-dom": "6.3.0",
"react-helmet-async": "1.1.2",
"react-query": "3.39.2",
"react-router": "6.0.0",
"react-router-dom": "6.0.0",
"reflect-metadata": "0.1.13",
"regenerator-runtime": "0.13.9",
"rxjs": "7.5.6",
"stream-browserify": "3.0.0",
"swagger-ui-express": "4.5.0",
"tslib": "2.4.0",
"typeorm": "0.3.9",
"yup": "0.32.11",
"lodash": "4.17.21"
"yup": "0.32.11"
},
"devDependencies": {
"@types/lodash": "4.14.184",
"@types/bull": "3.15.9",
"@emotion/babel-plugin": "11.10.2",
"@nestjs/schematics": "9.0.3",
"@nestjs/testing": "9.0.11",
"@nrwl/cli": "13.4.2",
"@nrwl/cypress": "13.4.2",
"@nrwl/eslint-plugin-nx": "13.4.2",
"@nrwl/jest": "13.4.2",
"@nrwl/js": "13.4.2",
"@nrwl/linter": "13.4.2",
"@nrwl/nest": "13.4.2",
"@nrwl/next": "13.4.2",
"@nrwl/node": "13.4.2",
"@nrwl/react": "13.4.2",
"@nrwl/tao": "13.4.2",
"@nrwl/web": "13.4.2",
"@nrwl/workspace": "13.4.2",
"@nrwl/cli": "14.6.5",
"@nrwl/cypress": "14.6.5",
"@nrwl/eslint-plugin-nx": "14.6.5",
"@nrwl/jest": "14.6.5",
"@nrwl/js": "14.6.5",
"@nrwl/linter": "14.6.5",
"@nrwl/nest": "14.6.5",
"@nrwl/next": "14.6.5",
"@nrwl/node": "14.6.5",
"@nrwl/react": "14.6.5",
"@nrwl/tao": "14.6.5",
"@nrwl/web": "14.6.5",
"@nrwl/workspace": "14.6.5",
"@svgr/rollup": "5.5.0",
"@testing-library/react": "13.4.0",
"@testing-library/react-hooks": "8.0.1",
"@testing-library/react": "12.1.2",
"@testing-library/react-hooks": "7.0.2",
"@types/bull": "3.15.9",
"@types/cron": "2.0.0",
"@types/d3": "7.4.0",
"@types/d3-sankey": "0.11.2",
"@types/jest": "27.5.2",
"@types/jest": "29.0.0",
"@types/lodash": "4.14.184",
"@types/luxon": "3.0.1",
"@types/multer": "1.4.7",
"@types/node": "16.11.57",
"@types/node": "18.7.15",
"@types/passport": "1.0.10",
"@types/passport-http": "0.3.9",
"@types/passport-strategy": "0.2.35",
"@types/react": "17.0.49",
"@types/react-dom": "18.0.6",
"@types/react-dom": "17.0.9",
"@types/react-helmet-async": "1.0.3",
"@typescript-eslint/eslint-plugin": "5.36.2",
"@typescript-eslint/parser": "5.36.2",
"babel-jest": "27.5.1",
"babel-jest": "29.0.2",
"barrelsby": "2.4.0",
"concurrently": "7.3.0",
"csv-parse": "5.3.0",
"cypress": "10.7.0",
"dotenv": "16.0.2",
"eslint": "8.23.0",
Expand All @@ -167,18 +170,21 @@
"eslint-plugin-react": "7.31.7",
"eslint-plugin-react-hooks": "4.6.0",
"husky": "8.0.1",
"jest": "27.5.1",
"jest": "29.0.2",
"nock": "13.2.9",
"orval": "6.5.1",
"orval": "6.9.6",
"prettier": "2.7.1",
"prisma": "4.3.1",
"react-test-renderer": "18.2.0",
"ts-jest": "27.1.5",
"react-test-renderer": "17.0.2",
"ts-jest": "28.0.8",
"ts-node": "10.9.1",
"typescript": "4.5.3",
"csv-parse": "5.3.0"
"typescript": "4.5.3"
},
"prisma": {
"schema": "apps/backend/prisma/schema.prisma"
},
"resolutions": {
"@types/react": "17.0.49",
"@types/react-dom": "17.0.9"
}
}
8 changes: 4 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ module.exports = (config) => {
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
new webpack.ProvidePlugin({
process: 'process/browser',
}),
// new webpack.ProvidePlugin({
// process: 'process/browser',
// }),
],
};
};
};
10 changes: 5 additions & 5 deletions workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"projectType": "application",
"targets": {
"build": {
"executor": "@nrwl/node:build",
"executor": "@nrwl/node:webpack",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/apps/backend",
Expand Down Expand Up @@ -68,7 +68,7 @@
}
},
"serve": {
"executor": "@nrwl/node:execute",
"executor": "@nrwl/node:node",
"options": {
"buildTarget": "backend:build"
}
Expand Down Expand Up @@ -182,7 +182,7 @@
"projectType": "application",
"targets": {
"build": {
"executor": "@nrwl/node:build",
"executor": "@nrwl/node:webpack",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/apps/tokenization",
Expand Down Expand Up @@ -220,7 +220,7 @@
}
},
"serve": {
"executor": "@nrwl/node:execute",
"executor": "@nrwl/node:node",
"options": {
"buildTarget": "tokenization:build"
}
Expand Down Expand Up @@ -323,4 +323,4 @@
"tags": []
}
}
}
}
Loading

0 comments on commit 0648290

Please sign in to comment.