diff --git a/CHANGELOG.md b/CHANGELOG.md index 99a0fad..6de55ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/package.json b/package.json index f6e4426..92095a2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@buildwithsygma/explorer-ui", - "version": "1.3.0", + "version": "1.4.0", "publishConfig": { "access": "restricted" }, diff --git a/src/components/ExplorerTable/ExplorerTable.tsx b/src/components/ExplorerTable/ExplorerTable.tsx index 6f32898..3bc35f5 100644 --- a/src/components/ExplorerTable/ExplorerTable.tsx +++ b/src/components/ExplorerTable/ExplorerTable.tsx @@ -28,6 +28,7 @@ type ExplorerTable = { const ExplorerTable: React.FC = ({ state, domainMetadata }: ExplorerTable) => { const { classes } = useStyles() + const NATIVE_RESOURCE_ID = "0x1000000000000000000000000000000000000000000000000000000000000000" const renderTransferList = (transferData: Transfer[]): JSX.Element[] => { return transferData.map((transfer: Transfer) => { @@ -96,7 +97,9 @@ const ExplorerTable: React.FC = ({ state, domainMetadata }: Explo - {type !== undefined ? formatTransferType(type as ResourceTypes) : "-"} + + {type !== undefined ? formatTransferType(resourceID !== NATIVE_RESOURCE_ID ? (type as ResourceTypes) : ResourceTypes.NATIVE) : "-"} + diff --git a/src/types/explorer.ts b/src/types/explorer.ts index e9bceb1..77411c7 100644 --- a/src/types/explorer.ts +++ b/src/types/explorer.ts @@ -229,6 +229,7 @@ export const enum ResourceTypes { PERMISSIONED_GENERIC = "permissionedGeneric", PERMISSIONLESS_GENERIC = "permissionlessGeneric", SEMI_FUNGIBLE = "semifungible", + NATIVE = "native", } export type SharedConfig = { diff --git a/src/utils/transferHelpers.ts b/src/utils/transferHelpers.ts index 34ea2e2..cd050bb 100644 --- a/src/utils/transferHelpers.ts +++ b/src/utils/transferHelpers.ts @@ -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" }