Skip to content

Commit

Permalink
[gear-idea] Update test balance service (#1407)
Browse files Browse the repository at this point in the history
  • Loading branch information
osipov-mit authored Sep 22, 2023
1 parent b9fe075 commit 6fcf25b
Show file tree
Hide file tree
Showing 14 changed files with 234 additions and 293 deletions.
2 changes: 0 additions & 2 deletions idea/test-balance/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@ DB_HOST=localhost
#gear
WS_PROVIDER=wss://rpc-node.gear-tech.io:443
TEST_ACCOUNT_SEED=0x8999321253e3a76e31d91767d0e2a915223210e008089a0d34e1919c0d84da5
ROOT_ACCOUNT_SEED=//Alice
TEST_ACCOUNT_BALANCE=10000000000
TEST_BALANCE_VALUE=1000000
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ export default {
gear: {
providerAddresses: checkEnv('WS_PROVIDER').split(','),
accountSeed: checkEnv('TEST_ACCOUNT_SEED'),
rootAccountSeed: checkEnv('ROOT_ACCOUNT_SEED'),
accountBalance: checkEnv('TEST_ACCOUNT_BALANCE'),
balanceToTransfer: checkEnv('TEST_BALANCE_VALUE'),
},
rabbitmq: {
Expand Down
2 changes: 1 addition & 1 deletion idea/test-balance/src/database/app-data-source.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DataSource } from 'typeorm';

import config from '../config/configuration';
import config from '../config';
import { TransferBalance } from './entities/transfer.entity';

export const AppDataSource = new DataSource({
Expand Down
60 changes: 0 additions & 60 deletions idea/test-balance/src/gear/connection.ts

This file was deleted.

81 changes: 0 additions & 81 deletions idea/test-balance/src/gear/index.ts

This file was deleted.

12 changes: 6 additions & 6 deletions idea/test-balance/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import express from 'express';

import config from './config/configuration';
import config from './config';

import { changeStatus, healthcheckRouter } from './healthcheck.router';
import { connectToDB } from './database/app-data-source';
import { gearService } from './gear';
import { initAMQ } from './rabbitmq/rmq';
import { transferProcess } from './common/transfer-balance-process';
import { transferProcess } from './transfer-balance-process';
import { logger } from '@gear-js/common';
import { transferService } from './transfer.service';
import { rmqService } from './rmq';

const app = express();

Expand All @@ -23,8 +23,8 @@ const startApp = async () => {
await connectToDB();
changeStatus('database');

await gearService.init();
await initAMQ();
await transferService.init();
await rmqService.init();
changeStatus('rabbitMQ');
transferProcess();
};
Expand Down
44 changes: 0 additions & 44 deletions idea/test-balance/src/rabbitmq/consumer.ts

This file was deleted.

22 changes: 0 additions & 22 deletions idea/test-balance/src/rabbitmq/producer.ts

This file was deleted.

55 changes: 0 additions & 55 deletions idea/test-balance/src/rabbitmq/rmq.ts

This file was deleted.

Loading

0 comments on commit 6fcf25b

Please sign in to comment.