Skip to content

Commit

Permalink
minor improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
RaaCT0R committed Nov 7, 2023
1 parent 89526d3 commit 8a9f511
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/chains/cardano/lib/network/AbstractCardanoNetwork.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AbstractUtxoChainNetwork } from '@rosen-chains/abstract-chain';
import { CardanoProtocolParams, CardanoTx, CardanoUtxo } from '../types';
import { CardanoProtocolParameters, CardanoTx, CardanoUtxo } from '../types';
import { CardanoRosenExtractor } from '@rosen-bridge/rosen-extractor';
import { Transaction } from '@emurgo/cardano-serialization-lib-nodejs';

Expand Down Expand Up @@ -32,7 +32,7 @@ abstract class AbstractCardanoNetwork extends AbstractUtxoChainNetwork<
* gets required parameters of Cardano Protocol
* @returns an object containing required protocol parameters
*/
abstract getProtocolParameters: () => Promise<CardanoProtocolParams>;
abstract getProtocolParameters: () => Promise<CardanoProtocolParameters>;
}

export default AbstractCardanoNetwork;
4 changes: 2 additions & 2 deletions packages/chains/cardano/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ interface CardanoTransactionJsonModel extends PaymentTransactionJsonModel {
inputUtxos: Array<string>;
}

interface CardanoProtocolParams {
interface CardanoProtocolParameters {
minFeeA: number;
minFeeB: number;
poolDeposit: string;
Expand All @@ -71,5 +71,5 @@ export {
CardanoTx,
UtxoBoxesAssets,
CardanoTransactionJsonModel,
CardanoProtocolParams,
CardanoProtocolParameters,
};
8 changes: 6 additions & 2 deletions packages/chains/cardano/tests/network/TestCardanoNetwork.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { AbstractCardanoNetwork } from '../../lib';
import { BlockInfo, ConfirmationStatus } from '@rosen-chains/abstract-chain';
import { CardanoProtocolParams, CardanoTx, CardanoUtxo } from '../../lib/types';
import {
CardanoProtocolParameters,
CardanoTx,
CardanoUtxo,
} from '../../lib/types';
import { CardanoRosenExtractor } from '@rosen-bridge/rosen-extractor';
import { protocolParameters } from '../testUtils';

Expand Down Expand Up @@ -63,7 +67,7 @@ class TestCardanoNetwork extends AbstractCardanoNetwork {
throw Error('Not mocked');
};

getProtocolParameters = (): Promise<CardanoProtocolParams> =>
getProtocolParameters = (): Promise<CardanoProtocolParameters> =>
Promise.resolve(protocolParameters);
}

Expand Down
4 changes: 2 additions & 2 deletions packages/networks/cardano-koios/lib/CardanoKoiosNetwork.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
CardanoUtxo,
CardanoTx,
CardanoAsset,
CardanoProtocolParams,
CardanoProtocolParameters,
} from '@rosen-chains/cardano';
import { RosenTokens } from '@rosen-bridge/tokens';
import {
Expand Down Expand Up @@ -537,7 +537,7 @@ class CardanoKoiosNetwork extends AbstractCardanoNetwork {
* gets required parameters of Cardano Protocol
* @returns an object containing required protocol parameters
*/
getProtocolParameters = async (): Promise<CardanoProtocolParams> => {
getProtocolParameters = async (): Promise<CardanoProtocolParameters> => {
const allParams = await this.client.getEpochParams();
const epochParams = allParams[0];
this.logger.debug(
Expand Down

0 comments on commit 8a9f511

Please sign in to comment.