@@ -11,7 +11,6 @@ import {
1111 AmountRow ,
1212 ContainerWithAmount
1313} from '@popup/pages/deploy-details/components/common' ;
14- import { getEntryPointName } from '@popup/pages/deploy-details/utils' ;
1514
1615import { AccountInfoRow } from '@libs/ui/components/account-info-row/account-info-row' ;
1716
@@ -20,19 +19,22 @@ const ManageAuctionBidAction = ({
2019 title,
2120 fiatAmount,
2221 contractPackageHash,
23- contractName
22+ contractName,
23+ contractLink
2424} : {
2525 amount : string ;
2626 title : string ;
2727 fiatAmount : string ;
2828 contractPackageHash : string ;
2929 contractName : string ;
30+ contractLink ?: Maybe < string > ;
3031} ) => (
3132 < ActionContainerWithLink
3233 title = { title }
3334 contractName = { contractName }
3435 contractIcon = { DeployIcon . Auction }
3536 contractPackageHash = { contractPackageHash }
37+ contractLink = { contractLink }
3638 >
3739 < AmountRow
3840 amount = { amount }
@@ -77,6 +79,7 @@ const DelegationAuctionAction = ({
7779 isAction
7880 iconSize = { 20 }
7981 csprName = { toValidatorAccountInfo ?. csprName }
82+ accountLink = { toValidatorAccountInfo ?. explorerLink }
8083 />
8184 ) }
8285 { ( isUndelegate || isRedelegate ) && (
@@ -89,6 +92,7 @@ const DelegationAuctionAction = ({
8992 isAction
9093 iconSize = { 20 }
9194 csprName = { fromValidatorAccountInfo ?. csprName }
95+ accountLink = { fromValidatorAccountInfo ?. explorerLink }
9296 />
9397 < AccountInfoRow
9498 publicKey = { toValidator }
@@ -98,6 +102,7 @@ const DelegationAuctionAction = ({
98102 isAction
99103 iconSize = { 20 }
100104 csprName = { toValidatorAccountInfo ?. csprName }
105+ accountLink = { toValidatorAccountInfo ?. explorerLink }
101106 />
102107 </ >
103108 ) }
@@ -106,19 +111,32 @@ const DelegationAuctionAction = ({
106111} ;
107112
108113interface AuctionActionRowsProps {
109- deploy : IAuctionDeploy ;
114+ entryPoint : IAuctionDeploy [ 'entryPoint' ] ;
115+ formattedDecimalAmount : IAuctionDeploy [ 'formattedDecimalAmount' ] ;
116+ fiatAmount : IAuctionDeploy [ 'fiatAmount' ] ;
117+ fromValidator : IAuctionDeploy [ 'fromValidator' ] ;
118+ toValidator : IAuctionDeploy [ 'toValidator' ] ;
119+ fromValidatorAccountInfo : IAuctionDeploy [ 'fromValidatorAccountInfo' ] ;
120+ toValidatorAccountInfo : IAuctionDeploy [ 'toValidatorAccountInfo' ] ;
121+ contractName : IAuctionDeploy [ 'contractName' ] ;
122+ contractPackageHash : IAuctionDeploy [ 'contractPackageHash' ] ;
123+ title : string ;
124+ contractLink ?: Maybe < string > ;
110125}
111126
112- export const AuctionActionRows = ( { deploy } : AuctionActionRowsProps ) => {
113- const {
114- entryPoint,
115- formattedDecimalAmount,
116- fiatAmount,
117- fromValidator,
118- toValidator,
119- fromValidatorAccountInfo,
120- toValidatorAccountInfo
121- } = deploy ;
127+ export const AuctionActionRows = ( {
128+ entryPoint,
129+ formattedDecimalAmount,
130+ fiatAmount,
131+ fromValidator,
132+ toValidator,
133+ fromValidatorAccountInfo,
134+ toValidatorAccountInfo,
135+ contractPackageHash,
136+ contractName,
137+ title,
138+ contractLink
139+ } : AuctionActionRowsProps ) => {
122140 const isManageAuctionBidDeploy =
123141 entryPoint === AuctionDeployEntryPoint . activate ||
124142 entryPoint === AuctionDeployEntryPoint . withdraw ||
@@ -129,16 +147,15 @@ export const AuctionActionRows = ({ deploy }: AuctionActionRowsProps) => {
129147 entryPoint === AuctionDeployEntryPoint . undelegate ||
130148 entryPoint === AuctionDeployEntryPoint . redelegate ;
131149
132- const title = getEntryPointName ( deploy , true ) ;
133-
134150 if ( isManageAuctionBidDeploy ) {
135151 return (
136152 < ManageAuctionBidAction
137153 amount = { formattedDecimalAmount }
138154 title = { title }
139155 fiatAmount = { fiatAmount }
140- contractName = { deploy . contractName }
141- contractPackageHash = { deploy . contractPackageHash }
156+ contractName = { contractName }
157+ contractPackageHash = { contractPackageHash }
158+ contractLink = { contractLink }
142159 />
143160 ) ;
144161 }
@@ -161,8 +178,9 @@ export const AuctionActionRows = ({ deploy }: AuctionActionRowsProps) => {
161178 return (
162179 < DefaultActionRows
163180 title = { title }
164- contractPackageHash = { deploy . contractPackageHash }
165- contractName = { deploy . contractName }
181+ contractPackageHash = { contractPackageHash }
182+ contractName = { contractName }
183+ contractLink = { contractLink }
166184 iconUrl = { DeployIcon . Auction }
167185 />
168186 ) ;
0 commit comments