forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show package upgrade in transaction (MystenLabs#13318)
Show upgraded system packages in a transaction [APPS-1465](https://mysten.atlassian.net/browse/APPS-1465) <img width="614" alt="Screenshot 2023-08-07 at 4 21 29 PM" src="https://github.com/MystenLabs/sui/assets/126525197/374688e3-60d8-4241-a17e-fe6af78eb9a2">
- Loading branch information
1 parent
3a99d20
commit 0ae54a7
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
apps/explorer/src/pages/transaction-result/transaction-summary/UpgradedSystemPackages.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright (c) Mysten Labs, Inc. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { Text } from '@mysten/ui'; | ||
|
||
import { ObjectLink } from '~/ui/InternalLink'; | ||
import { TransactionBlockCard, TransactionBlockCardSection } from '~/ui/TransactionBlockCard'; | ||
|
||
import type { OwnedObjectRef } from '@mysten/sui.js/client'; | ||
|
||
export function UpgradedSystemPackages({ data }: { data: OwnedObjectRef[] }) { | ||
if (!data?.length) return null; | ||
|
||
return ( | ||
<TransactionBlockCard title="Changes" size="sm" shadow> | ||
<TransactionBlockCardSection | ||
title={ | ||
<Text variant="body/semibold" color="success-dark"> | ||
Updated | ||
</Text> | ||
} | ||
> | ||
<div className="flex flex-col gap-2"> | ||
{data.map((object) => { | ||
const { objectId } = object.reference; | ||
return ( | ||
<div className="flex flex-wrap items-center justify-between" key={objectId}> | ||
<div className="flex items-center gap-0.5"> | ||
<Text variant="pBody/medium" color="steel-dark"> | ||
Package | ||
</Text> | ||
</div> | ||
|
||
<div className="flex items-center"> | ||
<ObjectLink objectId={objectId} /> | ||
</div> | ||
</div> | ||
); | ||
})} | ||
</div> | ||
</TransactionBlockCardSection> | ||
</TransactionBlockCard> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters