Skip to content

Commit

Permalink
chore(rollups): Rename folders from 0.9 to 1.0 for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
brunomenezes committed Aug 29, 2023
1 parent 925a434 commit ea66c75
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 271 deletions.
4 changes: 2 additions & 2 deletions apps/rollups/__tests__/containers/rollups/DApp.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import {
PageInfo,
useDappQuery,
useInputEdgeQuery,
} from '../../../src/generated/graphql/rollups/0.9';
} from '../../../src/generated/graphql/rollups/1.0';
import { withChakraTheme } from '../../test-utilities';
const path = '../../../src/generated/graphql/rollups/0.9';
const path = '../../../src/generated/graphql/rollups/1.0';
jest.mock(path, () => {
const originalModule = jest.requireActual(path);
return {
Expand Down
4 changes: 2 additions & 2 deletions apps/rollups/__tests__/containers/rollups/LocalDApps.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

import { act, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { withChakraTheme } from '../../test-utilities';
import {
DappsSummary,
LocalDAppList,
} from '../../../src/containers/rollups/LocalDApps';
import { useApplications } from '../../../src/services/useApplications';
import { withChakraTheme } from '../../test-utilities';

const path = '../../../src/services/useApplications';
jest.mock(path, () => {
Expand Down Expand Up @@ -134,7 +134,7 @@ describe('LocalDApps container', () => {
const errorMessage = 'Error XYZ';
const applications = [
{
factoryVersion: '0.9',
factoryVersion: '1.0',
address: 'some-address',
inputs: [],
deploymentTimestamp: new Date().getTime() / 1000,
Expand Down
4 changes: 2 additions & 2 deletions apps/rollups/__tests__/services/useApplications.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ describe('useApplications Hook', () => {
expect(isDeploymentCalled).toBe(true);
});

it('should retrieve DApp (v0.9) information directly from smartcontract', async () => {
it('should retrieve DApp (v1.0) information directly from smartcontract', async () => {
const factory = buildUseRollupFactoryReturn();
factory.queryFilter = jest.fn(() =>
Promise.resolve<any>([buildApplicationCreatedEvent()])
Expand All @@ -150,7 +150,7 @@ describe('useApplications Hook', () => {
expect(result.current.applications).toHaveLength(1);
expect(result.current.applications[0]).toHaveProperty(
'factoryVersion',
'0.9'
'1.0'
);
expect(result.current.applications[0]).toHaveProperty(
'address',
Expand Down
6 changes: 3 additions & 3 deletions apps/rollups/codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ generates:
- typescript
- typescript-operations
- typescript-urql
./src/generated/graphql/rollups/0.9/index.ts:
./src/generated/graphql/rollups/1.0/index.ts:
schema:
- ./graphql/schema/0.9/schema.graphql
- ./graphql/schema/1.0/schema.graphql
documents:
- ./graphql/documents/0.9/queries.graphql
- ./graphql/documents/1.0/queries.graphql
plugins:
- typescript
- typescript-operations
Expand Down
2 changes: 1 addition & 1 deletion apps/rollups/graphql/mock/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { createServer } from 'node:http';
import { join } from 'path';
import { BigInt, Float, Int, String } from './custom-scalars';
const typeDefs = readFileSync(
join(process.cwd(), 'graphql/schema/0.9/schema.graphql'),
join(process.cwd(), 'graphql/schema/1.0/schema.graphql'),
{
encoding: 'utf-8',
}
Expand Down
258 changes: 0 additions & 258 deletions apps/rollups/graphql/schema/0.8/schema.graphql

This file was deleted.

2 changes: 1 addition & 1 deletion apps/rollups/src/containers/rollups/DApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { FC, ReactElement, useState } from 'react';
import {
useDappQuery,
useInputEdgeQuery,
} from '../../generated/graphql/rollups/0.9';
} from '../../generated/graphql/rollups/1.0';
import { DappStats } from './DappStats';
const ReactJson = dynamic(import('react-json-view'), { ssr: false });

Expand Down
4 changes: 2 additions & 2 deletions apps/rollups/src/services/useApplications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ interface Application {
}

type FactoryType = CartesiDAppFactory;
type FactoryVersion = '0.8' | '0.9';
type FactoryVersion = '1.0';

/**
* Fetch the DApp information (i.e. Address) from a specific factory version from a block-number
Expand Down Expand Up @@ -112,7 +112,7 @@ export const useApplications = (): Applications => {
Promise.all([
fetchApplications(
factory,
'0.9',
'1.0',
deployBlock,
(dapp: string, blockNumber?: number) =>
inputBoxMeta.getInputs(dapp, blockNumber)
Expand Down

2 comments on commit ea66c75

@vercel
Copy link

@vercel vercel bot commented on ea66c75 Aug 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

rollups – ./apps/rollups

rollups-cartesi.vercel.app
rollups-git-production-cartesi.vercel.app
rollups.vercel.app

@vercel
Copy link

@vercel vercel bot commented on ea66c75 Aug 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

staking – ./apps/staking

staking-wine-eight.vercel.app
staking-git-production-cartesi.vercel.app
staking-cartesi.vercel.app
explorer.cartesi.io

Please sign in to comment.