@@ -118,6 +118,8 @@ const auxiliaryData = {
118
118
scripts : [ mockScript2 ]
119
119
} ;
120
120
121
+ const fee = 170_000n ;
122
+
121
123
const buildMockTx = (
122
124
args : {
123
125
inputs ?: Cardano . HydratedTxIn [ ] ;
@@ -143,7 +145,7 @@ const buildMockTx = (
143
145
certificates : args . certificates ,
144
146
collateralReturn : args . collateralReturn ?? undefined ,
145
147
collaterals : args . collaterals ?? undefined ,
146
- fee : 170_000n ,
148
+ fee,
147
149
inputs : args . inputs ?? [
148
150
{
149
151
address : addresses [ 0 ] ,
@@ -255,7 +257,7 @@ describe('Transaction Summary Inspector', () => {
255
257
address : externalAddress1 ,
256
258
value : {
257
259
assets : new Map ( [ [ AssetIds . TSLA , 5n ] ] ) ,
258
- coins : 5_000_000n
260
+ coins : 5_000_000n - fee // In this TX the fee is coming out of one of the external addresses.
259
261
}
260
262
} ,
261
263
{
@@ -346,7 +348,7 @@ describe('Transaction Summary Inspector', () => {
346
348
coins : - 10_000_000n ,
347
349
collateral : 0n ,
348
350
deposit : 0n ,
349
- fee : 170_000n ,
351
+ fee,
350
352
returnedDeposit : 0n ,
351
353
unresolved : {
352
354
inputs : [ ] ,
@@ -382,7 +384,7 @@ describe('Transaction Summary Inspector', () => {
382
384
address : addresses [ 0 ] ,
383
385
value : {
384
386
assets : new Map ( [ [ AssetIds . TSLA , 5n ] ] ) ,
385
- coins : 5_000_000n
387
+ coins : 5_000_000n - fee // In this TX the fee is coming out of one of our own addresses.
386
388
}
387
389
}
388
390
]
@@ -433,10 +435,10 @@ describe('Transaction Summary Inspector', () => {
433
435
// Assert
434
436
expect ( summary ) . toEqual ( {
435
437
assets : new Map ( ) ,
436
- coins : 0n ,
438
+ coins : - fee ,
437
439
collateral : 10_000_000n ,
438
440
deposit : 0n ,
439
- fee : 170_000n ,
441
+ fee,
440
442
returnedDeposit : 0n ,
441
443
unresolved : {
442
444
inputs : [ ] ,
@@ -473,7 +475,7 @@ describe('Transaction Summary Inspector', () => {
473
475
address : addresses [ 0 ] ,
474
476
value : {
475
477
assets : new Map ( [ [ AssetIds . TSLA , 5n ] ] ) ,
476
- coins : 27_000_000n
478
+ coins : 27_000_000n - fee // In this TX the fee is coming out of one of our own addresses.
477
479
}
478
480
}
479
481
] ,
@@ -525,10 +527,10 @@ describe('Transaction Summary Inspector', () => {
525
527
// Assert
526
528
expect ( summary ) . toEqual ( {
527
529
assets : new Map ( ) ,
528
- coins : 0n ,
530
+ coins : - fee ,
529
531
collateral : 25_000_000n ,
530
532
deposit : 0n ,
531
- fee : 170_000n ,
533
+ fee,
532
534
returnedDeposit : 0n ,
533
535
unresolved : {
534
536
inputs : [ ] ,
@@ -564,7 +566,7 @@ describe('Transaction Summary Inspector', () => {
564
566
address : addresses [ 0 ] ,
565
567
value : {
566
568
assets : new Map ( [ [ AssetIds . TSLA , 5n ] ] ) ,
567
- coins : 5_000_000n
569
+ coins : 5_000_000n - fee // In this TX the fee is coming out of one of our own addresses.
568
570
}
569
571
}
570
572
]
@@ -609,10 +611,10 @@ describe('Transaction Summary Inspector', () => {
609
611
// Assert
610
612
expect ( summary ) . toEqual ( {
611
613
assets : new Map ( ) ,
612
- coins : 0n ,
614
+ coins : - fee ,
613
615
collateral : 5_000_000n ,
614
616
deposit : 0n ,
615
- fee : 170_000n ,
617
+ fee,
616
618
returnedDeposit : 0n ,
617
619
unresolved : {
618
620
inputs : [ ] ,
@@ -637,7 +639,7 @@ describe('Transaction Summary Inspector', () => {
637
639
address : addresses [ 0 ] ,
638
640
value : {
639
641
assets : new Map ( [ [ AssetIds . TSLA , 5n ] ] ) ,
640
- coins : 3_000_000n
642
+ coins : 3_000_000n - fee // In this TX the fee is coming out of one of our own addresses.
641
643
}
642
644
}
643
645
]
@@ -676,10 +678,10 @@ describe('Transaction Summary Inspector', () => {
676
678
// Assert
677
679
expect ( summary ) . toEqual ( {
678
680
assets : new Map ( ) ,
679
- coins : - 2_000_000n ,
681
+ coins : - 2_000_000n - fee ,
680
682
collateral : 0n ,
681
683
deposit : 2_000_000n ,
682
- fee : 170_000n ,
684
+ fee,
683
685
returnedDeposit : 0n ,
684
686
unresolved : {
685
687
inputs : [ ] ,
@@ -704,7 +706,7 @@ describe('Transaction Summary Inspector', () => {
704
706
address : addresses [ 0 ] ,
705
707
value : {
706
708
assets : new Map ( [ [ AssetIds . TSLA , 5n ] ] ) ,
707
- coins : 5_000_000n
709
+ coins : 5_000_000n - fee // In this TX the fee is coming out of one of our own addresses.
708
710
}
709
711
}
710
712
]
@@ -743,10 +745,10 @@ describe('Transaction Summary Inspector', () => {
743
745
// Assert
744
746
expect ( summary ) . toEqual ( {
745
747
assets : new Map ( ) ,
746
- coins : 2_000_000n ,
748
+ coins : 2_000_000n - fee ,
747
749
collateral : 0n ,
748
750
deposit : 0n ,
749
- fee : 170_000n ,
751
+ fee,
750
752
returnedDeposit : 2_000_000n ,
751
753
unresolved : {
752
754
inputs : [ ] ,
@@ -780,7 +782,7 @@ describe('Transaction Summary Inspector', () => {
780
782
address : addresses [ 0 ] ,
781
783
value : {
782
784
assets : new Map ( [ [ AssetIds . TSLA , 5n ] ] ) ,
783
- coins : 5_000_000n
785
+ coins : 5_000_000n - fee // In this TX the fee is coming out of one of our own addresses.
784
786
}
785
787
}
786
788
]
@@ -819,10 +821,10 @@ describe('Transaction Summary Inspector', () => {
819
821
// Assert
820
822
expect ( summary ) . toEqual ( {
821
823
assets : new Map ( ) ,
822
- coins : - 15_000_000n ,
824
+ coins : - 15_000_000n - fee ,
823
825
collateral : 0n ,
824
826
deposit : 15_000_000n ,
825
- fee : 170_000n ,
827
+ fee,
826
828
returnedDeposit : 0n ,
827
829
unresolved : {
828
830
inputs : [ ] ,
@@ -856,7 +858,7 @@ describe('Transaction Summary Inspector', () => {
856
858
address : addresses [ 0 ] ,
857
859
value : {
858
860
assets : new Map ( [ [ AssetIds . TSLA , 5n ] ] ) ,
859
- coins : 20_000_000n
861
+ coins : 20_000_000n - fee // In this TX the fee is coming out of one of our own addresses.
860
862
}
861
863
}
862
864
]
@@ -895,10 +897,10 @@ describe('Transaction Summary Inspector', () => {
895
897
// Assert
896
898
expect ( summary ) . toEqual ( {
897
899
assets : new Map ( ) ,
898
- coins : 15_000_000n ,
900
+ coins : 15_000_000n - fee ,
899
901
collateral : 0n ,
900
902
deposit : 0n ,
901
- fee : 170_000n ,
903
+ fee,
902
904
returnedDeposit : 15_000_000n ,
903
905
unresolved : {
904
906
inputs : [ ] ,
@@ -932,7 +934,7 @@ describe('Transaction Summary Inspector', () => {
932
934
address : addresses [ 0 ] ,
933
935
value : {
934
936
assets : new Map ( [ [ AssetIds . TSLA , 5n ] ] ) ,
935
- coins : 20_000_000n
937
+ coins : 20_000_000n - fee // In this TX the fee is coming out of one of our own addresses.
936
938
}
937
939
} ,
938
940
{
@@ -986,10 +988,10 @@ describe('Transaction Summary Inspector', () => {
986
988
[ assetInfos [ AssetInfoIdx . PXL ] , 1n ] ,
987
989
[ assetInfos [ AssetInfoIdx . Unit ] , 1n ]
988
990
] ) ,
989
- coins : 100_000_000n ,
991
+ coins : 100_000_000n - fee ,
990
992
collateral : 0n ,
991
993
deposit : 0n ,
992
- fee : 170_000n ,
994
+ fee,
993
995
returnedDeposit : 0n ,
994
996
unresolved : {
995
997
inputs : [
0 commit comments