diff --git a/CHANGELOG.md b/CHANGELOG.md
index 309f3f9c..1ea9be46 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,27 @@
Changelog
=========
+## 1.5.0
+
+### Compatible with:
+
+- [`cardano-graphql`: `4.0.0`](https://github.com/input-output-hk/cardano-graphql/releases/tag/4.0.0)
+
+### Features
+- add query to support fetching transaction metadata ([d5f4344](https://github.com/input-output-hk/cardano-explorer-app/commit/d5f4344959be2f0bdd4e59426e915c5d85283c0c)
+- asset metadata in tooltip ([e44a98d](https://github.com/input-output-hk/cardano-explorer-app/commit/e44a98dd0a229601abd527fef77cb85f96d3964d)
+- add global slot number support ([65c4a32](https://github.com/input-output-hk/cardano-explorer-app/commit/65c4a3279b0517f4d0e07f3d5b6188239130a0bb)
+- add support link to footer ([957b3ad](https://github.com/input-output-hk/cardano-explorer-app/commit/957b3ad1378de2f3206b391e55cf4f923278452d)
+- allow rewards query ([30b0c68](https://github.com/input-output-hk/cardano-explorer-app/commit/30b0c68d249c05ec1d50e2fd972056cb2641e0b4)
+
+### Fixes
+- remove stray acute character ([c67279a](https://github.com/input-output-hk/cardano-explorer-app/commit/c67279a3108595c6633932d670e442fef1a22ed6)
+- infinite loading after block search ([b782199](https://github.com/input-output-hk/cardano-explorer-app/commit/b782199da40707a39932f3d4f5dc55e2b4da000d)
+- use protocolVersion.major comparison to determine epoch slot count ([4c676d7](https://github.com/input-output-hk/cardano-explorer-app/commit/4c676d744eb2ca534b82635df7703d69722d966d)
+
+### Refactorings
+- replace use fingerprint from API ([2b5ca7c](https://github.com/input-output-hk/cardano-explorer-app/commit/2b5ca7c66a85bbac8a8fdead277bcd33d28ba13e)
+
## 1.4.0
### Compatible with:
diff --git a/README.md b/README.md
index d0935260..45dffa10 100755
--- a/README.md
+++ b/README.md
@@ -19,9 +19,16 @@ See [environment](source/environment.ts) for defaults.
## Build
This project uses an offline package cache to enable reproducible builds.
+
+### yarn
```console
yarn --offline && yarn static:build
```
+
+### nix
+``` console
+nix-build -A cardano-explorer-app
+```
## Deploy
The static bundle can be deployed using a standard web server. A simple [Node.js program](deploy/index.js)
is available for deploying the build to an AWS S3 bucket.
@@ -55,4 +62,3 @@ The `master` and `develop` branches are continuously deployed, with PRs creating
[![Netlify Status](https://api.netlify.com/api/v1/badges/09492acb-61fd-4745-8b0e-60c8886f60d1/deploy-status)](https://cardano-explorer-mainnet.netlify.app)
#### Testnet
[![Netlify Status](https://api.netlify.com/api/v1/badges/16628b5d-b1f2-429b-a707-bbdec0564fe9/deploy-status)](https://cardano-explorer-testnet.netlify.app)
-
diff --git a/package.json b/package.json
index 007056c6..fd4edee9 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "cardano-explorer-app",
- "version": "1.4.0",
+ "version": "1.5.0",
"description": "Cardano Explorer App",
"author": "Daedalus Team @ Input Output HK",
"license": "Apache-2.0",
@@ -33,7 +33,6 @@
}
},
"dependencies": {
- "@emurgo/cip14-js": "^2.0.0",
"@types/react-addons-css-transition-group": "15.0.5",
"bignumber.js": "9.0.1",
"browser-update": "3.3.9",
@@ -73,7 +72,7 @@
"@babel/plugin-transform-react-display-name": "7.8.3",
"@babel/plugin-transform-react-jsx-self": "7.9.0",
"@babel/plugin-transform-react-jsx-source": "7.9.0",
- "@cardano-graphql/client-ts": "3.2.0",
+ "@cardano-graphql/client-ts": "^4.0.0",
"@cypress/webpack-preprocessor": "4.1.1",
"@graphql-codegen/cli": "1.2.0",
"@graphql-codegen/typescript": "1.2.0",
diff --git a/packages-cache/@cardano-graphql-client-ts-3.2.0.tgz b/packages-cache/@cardano-graphql-client-ts-3.2.0.tgz
deleted file mode 100644
index a277f763..00000000
Binary files a/packages-cache/@cardano-graphql-client-ts-3.2.0.tgz and /dev/null differ
diff --git a/packages-cache/@cardano-graphql-client-ts-4.0.0.tgz b/packages-cache/@cardano-graphql-client-ts-4.0.0.tgz
new file mode 100644
index 00000000..e800d294
Binary files /dev/null and b/packages-cache/@cardano-graphql-client-ts-4.0.0.tgz differ
diff --git a/packages-cache/@emurgo-cip14-js-2.0.0.tgz b/packages-cache/@emurgo-cip14-js-2.0.0.tgz
deleted file mode 100644
index 57a40fd3..00000000
Binary files a/packages-cache/@emurgo-cip14-js-2.0.0.tgz and /dev/null differ
diff --git a/packages-cache/bech32-2.0.0.tgz b/packages-cache/bech32-2.0.0.tgz
deleted file mode 100644
index 3b6368c8..00000000
Binary files a/packages-cache/bech32-2.0.0.tgz and /dev/null differ
diff --git a/packages-cache/blake2b-2.1.3.tgz b/packages-cache/blake2b-2.1.3.tgz
deleted file mode 100644
index e1ba98e5..00000000
Binary files a/packages-cache/blake2b-2.1.3.tgz and /dev/null differ
diff --git a/packages-cache/blake2b-wasm-1.1.7.tgz b/packages-cache/blake2b-wasm-1.1.7.tgz
deleted file mode 100644
index f1b816b7..00000000
Binary files a/packages-cache/blake2b-wasm-1.1.7.tgz and /dev/null differ
diff --git a/packages-cache/nanoassert-1.1.0.tgz b/packages-cache/nanoassert-1.1.0.tgz
deleted file mode 100644
index d43f955c..00000000
Binary files a/packages-cache/nanoassert-1.1.0.tgz and /dev/null differ
diff --git a/source/constants.ts b/source/constants.ts
index 90266e4e..3cf433c5 100644
--- a/source/constants.ts
+++ b/source/constants.ts
@@ -10,7 +10,8 @@ export enum BrandType {
export enum SearchType {
EPOCH = 'epoch',
- BLOCK = 'block',
+ BLOCK_BY_NUMBER = 'blockByNumber',
+ BLOCK_BY_SLOT_NUMBER = 'blockBySlotNumber',
}
export enum CardanoNetwork {
diff --git a/source/environment.ts b/source/environment.ts
index 748061df..ff4371ec 100755
--- a/source/environment.ts
+++ b/source/environment.ts
@@ -7,10 +7,10 @@ export const environment = {
CARDANO: {
ERA: (process.env.CARDANO_ERA as CardanoEra) || CardanoEra.BYRON,
GRAPHQL: {
- HTTP_URL: `${process.env.GRAPHQL_API_PROTOCOL || 'https'}://${
+ HTTP_URL: `${process.env.GRAPHQL_API_PROTOCOL || 'http'}://${
process.env.GRAPHQL_API_HOST ||
- 'cardano-graphql-mainnet.daedalus-operations.com'
- }:${process.env.GRAPHQL_API_PORT || '443'}/${
+ 'localhost'
+ }:${process.env.GRAPHQL_API_PORT || '3100'}/${
process.env.GRAPHQL_API_PATH || ''
}`,
},
diff --git a/source/features/address/api/transformers.ts b/source/features/address/api/transformers.ts
index 4c29165c..ed0d29a9 100644
--- a/source/features/address/api/transformers.ts
+++ b/source/features/address/api/transformers.ts
@@ -1,11 +1,12 @@
import { Currency } from 'cardano-js';
import {
+ Asset,
SearchForPaymentAddressQuery,
- SearchForStakeAddressQuery, Token,
+ SearchForStakeAddressQuery,
} from '../../../../generated/typings/graphql-schema';
import { sortTokensDesc } from '../../../lib/arrays';
import { isDefined } from '../../../lib/types';
-import { assetFingerprintFromToken } from '../../transactions/helpers';
+import { assetTransformer } from '../../assets/api/transformers';
import { IPaymentAddressSummary, IStakeAddressSummary } from '../types';
export const paymentAddressDetailTransformer = (
@@ -20,12 +21,10 @@ export const paymentAddressDetailTransformer = (
tokensBalance:
s
.paymentAddresses![0]?.summary?.assetBalances?.filter(isDefined)
- .filter(({ assetName }) => assetName !== 'ada')
+ .filter(({ asset }) => asset.assetName !== 'ada')
.map((t) => ({
...t,
- asset: {
- fingerprint: assetFingerprintFromToken(t as Token),
- }
+ asset: assetTransformer(t.asset as Asset)
}))
.sort(sortTokensDesc) || [],
transactionsCount:
diff --git a/source/features/assets/api/transformers.ts b/source/features/assets/api/transformers.ts
new file mode 100644
index 00000000..98cc8f4d
--- /dev/null
+++ b/source/features/assets/api/transformers.ts
@@ -0,0 +1,15 @@
+import { Asset } from '../../../../generated/typings/graphql-schema';
+import { IAsset } from '../../transactions/types';
+
+export const assetTransformer = (
+ asset: Asset
+): IAsset => {
+ return {
+ ...asset,
+ assetName: asset.assetName as string,
+ description: asset.description ? asset.description as string : undefined,
+ fingerprint: asset.fingerprint,
+ name: asset.name ? asset.name as string : undefined,
+ ticker: asset.ticker ? asset.ticker as string : undefined,
+ }
+}
diff --git a/source/features/blocks/api/BlockDetails.graphql b/source/features/blocks/api/BlockDetails.graphql
index 850c33c2..6afe0c02 100644
--- a/source/features/blocks/api/BlockDetails.graphql
+++ b/source/features/blocks/api/BlockDetails.graphql
@@ -3,7 +3,7 @@
fragment BlockDetails on Block {
...BlockOverview
- merkelRoot
+ merkleRoot
nextBlock {
hash
number
diff --git a/source/features/blocks/api/BlockOverview.graphql b/source/features/blocks/api/BlockOverview.graphql
index 766f6b6a..840f1e3f 100644
--- a/source/features/blocks/api/BlockOverview.graphql
+++ b/source/features/blocks/api/BlockOverview.graphql
@@ -7,7 +7,7 @@ fragment BlockOverview on Block {
hash
number
size
- slotInEpoch
+ slotNo
transactions_aggregate {
aggregate {
count
diff --git a/source/features/blocks/api/transformers.ts b/source/features/blocks/api/transformers.ts
index 4b140222..a1b5aad0 100644
--- a/source/features/blocks/api/transformers.ts
+++ b/source/features/blocks/api/transformers.ts
@@ -26,7 +26,7 @@ export const blockOverviewTransformer = (
output: Currency.Util.lovelacesToAda(
b.transactions_aggregate?.aggregate?.sum?.totalOutput || '0'
),
- slotWithinEpoch: formatSlotWithinEpoch(b.slotInEpoch),
+ slotNo: formatSlot(b.slotNo),
transactionsCount:
b.transactions_aggregate?.aggregate?.count.toString() || '0',
};
@@ -36,7 +36,7 @@ export const blockDetailsTransformer = (
b: BlockDetailsFragment
): IBlockDetailed => ({
...blockOverviewTransformer(b),
- merkleRoot: b.merkelRoot || '',
+ merkleRoot: b.merkleRoot || '',
nextBlock: {
id: b.nextBlock?.hash || '',
number: b.nextBlock?.number || '-',
@@ -65,9 +65,9 @@ function formatCreatedBy(value: IBlockOverview['createdBy']): string {
}
}
-function formatSlotWithinEpoch(
- value: BlockOverviewFragment['slotInEpoch']
-): IBlockOverview['slotWithinEpoch'] {
+function formatSlot(
+ value: BlockOverviewFragment['slotNo']
+): IBlockOverview['slotNo'] {
switch (value) {
case 0:
return value;
diff --git a/source/features/blocks/specs/getLatestBlocks.spec.ts b/source/features/blocks/specs/getLatestBlocks.spec.ts
index bcbe0ec5..adc4d34d 100644
--- a/source/features/blocks/specs/getLatestBlocks.spec.ts
+++ b/source/features/blocks/specs/getLatestBlocks.spec.ts
@@ -35,7 +35,7 @@ describe('Blocks feature', () => {
await waitForExpect(() => {
expect(blocks.store.latestBlocks.length).toBe(10);
expect(blocks.store.latestBlocks[0].number).toBeDefined();
- expect(blocks.store.latestBlocks[0].slotWithinEpoch).toBeDefined();
+ expect(blocks.store.latestBlocks[0].slotNo).toBeDefined();
expect(blocks.store.latestBlocks[4].transactionsCount).toBeDefined();
expect(blocks.store.latestBlocks[1].number).toBeDefined();
});
diff --git a/source/features/blocks/types.ts b/source/features/blocks/types.ts
index 81b4a5d3..0bde7b4e 100644
--- a/source/features/blocks/types.ts
+++ b/source/features/blocks/types.ts
@@ -8,7 +8,7 @@ export interface IBlockOverview {
number: number | '-';
output: string;
size: number;
- slotWithinEpoch: number | '-';
+ slotNo: number | '-';
transactionsCount: string;
}
diff --git a/source/features/blocks/ui/BlockList.module.scss b/source/features/blocks/ui/BlockList.module.scss
index 2d0adaf3..3cec32c7 100644
--- a/source/features/blocks/ui/BlockList.module.scss
+++ b/source/features/blocks/ui/BlockList.module.scss
@@ -3,11 +3,15 @@
:global {
.epoch {
- width: 120px;
+ width: 40px;
+ }
+
+ .slotNo {
+ width: 80px;
}
.blocksSlots {
- width: 100px;
+ width: 80px;
}
.createdAt {
diff --git a/source/features/blocks/ui/BlockList.tsx b/source/features/blocks/ui/BlockList.tsx
index 1f296290..be272b76 100644
--- a/source/features/blocks/ui/BlockList.tsx
+++ b/source/features/blocks/ui/BlockList.tsx
@@ -27,21 +27,35 @@ const columns = (
return [
{
cellRender: (row: IBlockOverview) => {
- const content = `${row.epoch} / ${row.slotWithinEpoch}`;
return isNumber(row.epoch) &&
- isNumber(row.slotWithinEpoch) &&
!linksDisabled ? (