-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/add-validation-tab' of github.com:iotaledger/explo…
…rer into feat/add-validation-tab
- Loading branch information
Showing
24 changed files
with
475 additions
and
14 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "explorer-api", | ||
"description": "API for Tangle Explorer", | ||
"version": "3.3.4-rc.1", | ||
"version": "3.3.4", | ||
"author": "Martyn Janes <[email protected]>", | ||
"repository": { | ||
"type": "git", | ||
|
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
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,11 @@ | ||
export interface ITransactionDetailsRequest { | ||
/** | ||
* The network to search on. | ||
*/ | ||
network: string; | ||
|
||
/** | ||
* The transaction id to get the details for. | ||
*/ | ||
transactionId: string; | ||
} |
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,11 @@ | ||
/* eslint-disable import/no-unresolved */ | ||
/* eslint-disable @typescript-eslint/no-redundant-type-constituents */ | ||
import { Block } from "@iota/sdk-nova"; | ||
import { IResponse } from "./IResponse"; | ||
|
||
export interface ITransactionDetailsResponse extends IResponse { | ||
/** | ||
* Transaction included block. | ||
*/ | ||
block?: Block; | ||
} |
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
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,30 @@ | ||
import { ServiceFactory } from "../../../factories/serviceFactory"; | ||
import { ITransactionDetailsRequest } from "../../../models/api/nova/ITransactionDetailsRequest"; | ||
import { ITransactionDetailsResponse } from "../../../models/api/nova/ITransactionDetailsResponse"; | ||
import { IConfiguration } from "../../../models/configuration/IConfiguration"; | ||
import { NOVA } from "../../../models/db/protocolVersion"; | ||
import { NetworkService } from "../../../services/networkService"; | ||
import { NovaApiService } from "../../../services/nova/novaApiService"; | ||
import { ValidationHelper } from "../../../utils/validationHelper"; | ||
|
||
/** | ||
* Find the object from the network. | ||
* @param config The configuration. | ||
* @param request The request. | ||
* @returns The response. | ||
*/ | ||
export async function get(config: IConfiguration, request: ITransactionDetailsRequest): Promise<ITransactionDetailsResponse> { | ||
const networkService = ServiceFactory.get<NetworkService>("network"); | ||
const networks = networkService.networkNames(); | ||
ValidationHelper.oneOf(request.network, networks, "network"); | ||
ValidationHelper.string(request.transactionId, "transactionId"); | ||
|
||
const networkConfig = networkService.get(request.network); | ||
|
||
if (networkConfig.protocolVersion !== NOVA) { | ||
return {}; | ||
} | ||
|
||
const novaApiService = ServiceFactory.get<NovaApiService>(`api-service-${networkConfig.network}`); | ||
return novaApiService.transactionIncludedBlock(request.transactionId); | ||
} |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "explorer-client", | ||
"description": "Tangle Explorer UI", | ||
"version": "3.3.4-rc.1", | ||
"version": "3.3.4", | ||
"author": "Martyn Janes <[email protected]>", | ||
"type": "module", | ||
"repository": { | ||
|
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
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
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
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
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,71 @@ | ||
@import "../../../scss/fonts"; | ||
@import "../../../scss/mixins"; | ||
@import "../../../scss/media-queries"; | ||
@import "../../../scss/variables"; | ||
|
||
.transaction-page { | ||
display: flex; | ||
flex-direction: column; | ||
|
||
.wrapper { | ||
display: flex; | ||
justify-content: center; | ||
|
||
.inner { | ||
display: flex; | ||
flex: 1; | ||
flex-direction: column; | ||
max-width: $desktop-width; | ||
margin: 40px 25px; | ||
|
||
@include desktop-down { | ||
flex: unset; | ||
width: 100%; | ||
max-width: 100%; | ||
margin: 40px 24px; | ||
padding-right: 24px; | ||
padding-left: 24px; | ||
|
||
> .row { | ||
flex-direction: column; | ||
} | ||
} | ||
|
||
@include tablet-down { | ||
margin: 28px 0; | ||
} | ||
|
||
.transation-page--header { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
} | ||
|
||
.section { | ||
padding-top: 44px; | ||
|
||
.section--header { | ||
margin-top: 44px; | ||
} | ||
} | ||
|
||
.link { | ||
@include font-size(14px); | ||
|
||
max-width: 100%; | ||
color: var(--link-color); | ||
font-family: $ibm-plex-mono; | ||
font-weight: normal; | ||
letter-spacing: 0.02em; | ||
line-height: 20px; | ||
} | ||
} | ||
|
||
.section--data { | ||
.amount-transacted { | ||
@include font-size(15px); | ||
font-weight: 700; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.