File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/tx-construction/src/tx-builder Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -5,15 +5,15 @@ import { TxEvaluationResult, TxEvaluator } from './types';
5
5
* This evaluator assigns the maximum execution units per transaction to each redeemer.
6
6
*/
7
7
export class GreedyTxEvaluator implements TxEvaluator {
8
- #params: Promise < Cardano . ProtocolParameters > ;
8
+ #getProtocolParams: ( ) => Promise < Cardano . ProtocolParameters > ;
9
9
10
10
/**
11
11
* Creates an instance of GreedyTxEvaluator.
12
12
*
13
13
* @param getProtocolParams - A callback that resolves to the Cardano protocol parameters.
14
14
*/
15
15
constructor ( getProtocolParams : ( ) => Promise < Cardano . ProtocolParameters > ) {
16
- this . #params = getProtocolParams ( ) ;
16
+ this . #getProtocolParams = getProtocolParams ;
17
17
}
18
18
19
19
/**
@@ -24,7 +24,7 @@ export class GreedyTxEvaluator implements TxEvaluator {
24
24
* @returns A promise that resolves to the transaction evaluation result.
25
25
*/
26
26
async evaluate ( tx : Cardano . Tx , _ : Array < Cardano . Utxo > ) : Promise < TxEvaluationResult > {
27
- const { maxExecutionUnitsPerTransaction } = await this . #params ;
27
+ const { maxExecutionUnitsPerTransaction } = await this . #getProtocolParams ( ) ;
28
28
const { witness } = tx ;
29
29
30
30
if ( ! witness || ! witness . redeemers ) return [ ] ;
You can’t perform that action at this time.
0 commit comments