ts errors

This commit is contained in:
zramsay 2025-06-26 11:03:58 -04:00
parent aa27f4ff18
commit fa4628a153

View File

@ -1,6 +1,6 @@
import { Registry, Account, parseGasAndFees, DEFAULT_GAS_ESTIMATION_MULTIPLIER } from '@cerc-io/registry-sdk'; import { Registry, Account, parseGasAndFees, DEFAULT_GAS_ESTIMATION_MULTIPLIER } from '@cerc-io/registry-sdk';
import { DeliverTxResponse } from '@cosmjs/stargate'; import { DeliverTxResponse } from '@cosmjs/stargate';
import { getRegistry, Config } from './config.js'; import { Config } from './config.js';
import { verifyAtomPayment } from './atomPayments.js'; import { verifyAtomPayment } from './atomPayments.js';
import { RegHelper } from './deployments.js'; import { RegHelper } from './deployments.js';
import yaml from 'js-yaml'; import yaml from 'js-yaml';
@ -36,6 +36,7 @@ class PaymentProcessor {
*/ */
start(): void { start(): void {
console.log('Payment processor started'); console.log('Payment processor started');
this.initializeChains();
this.processPayments(); this.processPayments();
} }
@ -126,7 +127,7 @@ class PaymentProcessor {
* Since stack-orchestrator already handles LNT verification efficiently, * Since stack-orchestrator already handles LNT verification efficiently,
* we only need to handle ATOM verification here * we only need to handle ATOM verification here
*/ */
private async verifyLNTPayment(txHash: string, request: any): Promise<VerificationResult> { private async verifyLNTPayment(_txHash: string, _request: any): Promise<VerificationResult> {
try { try {
// LNT verification is handled by stack-orchestrator // LNT verification is handled by stack-orchestrator
// We assume if it's not an ATOM payment, stack-orchestrator will handle it // We assume if it's not an ATOM payment, stack-orchestrator will handle it
@ -311,6 +312,14 @@ class PaymentProcessor {
console.log(`Configured ${configs.length} payment chains`); console.log(`Configured ${configs.length} payment chains`);
return configs; return configs;
} }
/**
* Initialize chain configurations on startup
*/
private initializeChains(): void {
const configs = this.getChainConfigs();
console.log(`Payment processor initialized with ${configs.length} supported chains`);
}
} }
export { PaymentProcessor }; export { PaymentProcessor };