Skip to content

Commit

Permalink
Merge branch 'main' into feat/remove-shared-config-dep
Browse files Browse the repository at this point in the history
  • Loading branch information
wainola committed Sep 13, 2024
2 parents 79ce6ff + 5b6b803 commit 1c23d17
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## [1.4.0](https://github.com/sygmaprotocol/explorer-ui/compare/v1.3.0...v1.4.0) (2024-09-13)


### Features

* new type for transfer ([#177](https://github.com/sygmaprotocol/explorer-ui/issues/177)) ([ce9016a](https://github.com/sygmaprotocol/explorer-ui/commit/ce9016aa454a011e979de36bfe4e3f379ab035c1))
* special logic for native type of transfer ([#186](https://github.com/sygmaprotocol/explorer-ui/issues/186)) ([85f9329](https://github.com/sygmaprotocol/explorer-ui/commit/85f9329828896f5638d0abbe16e1f07e11f9b06e))


### Bug Fixes

* render issue on detail view for transfers with execution property as null ([#182](https://github.com/sygmaprotocol/explorer-ui/issues/182)) ([040c9c3](https://github.com/sygmaprotocol/explorer-ui/commit/040c9c37250e6719452475f8ca66744a3bf05574))


### Miscellaneous

* misc fixes ([#181](https://github.com/sygmaprotocol/explorer-ui/issues/181)) ([7cc589f](https://github.com/sygmaprotocol/explorer-ui/commit/7cc589fd05dd4add5aac554218b0accbb36c5a65))

## [1.3.0](https://github.com/sygmaprotocol/explorer-ui/compare/v1.2.2...v1.3.0) (2024-04-03)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@buildwithsygma/explorer-ui",
"version": "1.3.0",
"version": "1.4.0",
"publishConfig": {
"access": "restricted"
},
Expand Down
5 changes: 4 additions & 1 deletion src/components/ExplorerTable/ExplorerTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type ExplorerTable = {

const ExplorerTable: React.FC<ExplorerTable> = ({ state, domainMetadata }: ExplorerTable) => {
const { classes } = useStyles()
const NATIVE_RESOURCE_ID = "0x1000000000000000000000000000000000000000000000000000000000000000"

const renderTransferList = (transferData: Transfer[]): JSX.Element[] => {
return transferData.map((transfer: Transfer) => {
Expand Down Expand Up @@ -96,7 +97,9 @@ const ExplorerTable: React.FC<ExplorerTable> = ({ state, domainMetadata }: Explo
</TableCell>
<TableCell className={clsx(classes.row, classes.dataRow)}>
<span className={classes.amountInfo}>
<span>{type !== undefined ? formatTransferType(type as ResourceTypes) : "-"}</span>
<span>
{type !== undefined ? formatTransferType(resourceID !== NATIVE_RESOURCE_ID ? (type as ResourceTypes) : ResourceTypes.NATIVE) : "-"}
</span>
</span>
</TableCell>
<TableCell className={clsx(classes.row, classes.dataRow)}>
Expand Down
1 change: 1 addition & 0 deletions src/types/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ export const enum ResourceTypes {
PERMISSIONED_GENERIC = "permissionedGeneric",
PERMISSIONLESS_GENERIC = "permissionlessGeneric",
SEMI_FUNGIBLE = "semifungible",
NATIVE = "native",
}

export type SharedConfig = {
Expand Down
2 changes: 2 additions & 0 deletions src/utils/transferHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ export const formatTransferType = (transferType: ResourceTypes): string => {
return "Generic"
case ResourceTypes.SEMI_FUNGIBLE:
return "Semifungible"
case ResourceTypes.NATIVE:
return "Native"
default:
return "Fungible"
}
Expand Down

0 comments on commit 1c23d17

Please sign in to comment.