Skip to content

Commit

Permalink
Merge pull request #227 from bnb-chain/feat/tokenApi1216
Browse files Browse the repository at this point in the history
feat: Remove simulation logic
  • Loading branch information
wenty22 authored Dec 27, 2024
2 parents a001c71 + 22ef9ea commit 4a3f0c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class BridgeProcessor extends WorkerHost {
async fetchCBridge() {
const config = await this.web3Service.getTransferConfigsForAll();
if (!config) return;
await this.cache.set(`${CACHE_KEY.CBRIDGE_CONFIG}`, config, TIME.MINUTE * 5);
await this.cache.set(`${CACHE_KEY.CBRIDGE_CONFIG}`, config, TIME.DAY);
}

async fetchStargate() {
Expand Down
7 changes: 1 addition & 6 deletions apps/canonical-bridge-server/src/shared/web3/web3.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ import {
} from '@/common/constants';
import { values } from 'lodash';

let counter = 0;

@Injectable()
export class Web3Service {
private logger = new Logger(Web3Service.name);
Expand Down Expand Up @@ -62,12 +60,9 @@ export class Web3Service {
}

async getTransferConfigsForAll() {
this.logger.log(`[fetchCBridge] start, ${counter}`);
const { data } = await this.httpService.axiosRef.get<ITransferConfigsForAll>(
`${CBRIDGE_ENDPOINT}/v2/getTransferConfigsForAll${counter === 0 ? '' : '222222'}`,
`${CBRIDGE_ENDPOINT}/v2/getTransferConfigsForAll`,
);
counter += 1;
this.logger.log(`[fetchCBridge] end, ${counter}`);
return data;
}

Expand Down

0 comments on commit 4a3f0c3

Please sign in to comment.