@@ -43,7 +43,9 @@ import {
4343interface ISecondaryKeyItemProps {
4444 data : PermissionedAccount ;
4545 onEdit : ( ) => void ;
46- onRemove : ( ) => void ;
46+ onRemovePermissions : ( ) => void ;
47+ onRemoveKey : ( ) => void ;
48+ isTransactionInProgress ?: boolean ;
4749}
4850
4951type NormalizedPermission < T > = {
@@ -100,7 +102,9 @@ const formatPermissionDisplay = (
100102export const SecondaryKeyItem = ( {
101103 data,
102104 onEdit,
103- onRemove,
105+ onRemovePermissions,
106+ onRemoveKey,
107+ isTransactionInProgress = false ,
104108} : ISecondaryKeyItemProps ) => {
105109 const { allAccountsWithMeta, allKeyInfo, identity } =
106110 useContext ( AccountContext ) ;
@@ -445,24 +449,37 @@ export const SecondaryKeyItem = ({
445449 < Button
446450 variant = "outline"
447451 onClick = { onEdit }
452+ disabled = { isTransactionInProgress }
448453 title = "Edit permissions"
449454 aria-label = "Edit permissions"
450455 >
451456 < Icon name = "Edit" size = "24px" />
452457 Edit permissions
453458 </ Button >
454459 < Button
455- onClick = { onRemove }
456- title = "Remove permissions"
457- aria-label = "Remove all permissions for this secondary key"
460+ variant = "primary"
461+ onClick = { onRemovePermissions }
462+ disabled = { isTransactionInProgress }
463+ title = "Revoke all permissions from this secondary key"
464+ aria-label = "Revoke permissions"
458465 >
459466 < Icon name = "CloseIcon" size = "24px" />
460- Remove permissions
467+ Revoke Permissions
468+ </ Button >
469+ < Button
470+ variant = "primary"
471+ onClick = { onRemoveKey }
472+ disabled = { isTransactionInProgress }
473+ title = "Completely remove this secondary key from your identity"
474+ aria-label = "Remove secondary key"
475+ >
476+ < Icon name = "CloseIcon" size = "24px" />
477+ Remove Key
461478 </ Button >
462479 < Button
463480 variant = "secondary"
464481 onClick = { toggleDetails }
465- disabled = { ! hasDetails }
482+ disabled = { ! hasDetails || isTransactionInProgress }
466483 title = { getDetailsButtonLabel ( ) }
467484 aria-label = { getDetailsButtonLabel ( ) }
468485 aria-expanded = { detailsExpanded }
0 commit comments