-
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.
Merge pull request #3 from rarimo/feature/bridge
add oracles, tss pages
- Loading branch information
Showing
123 changed files
with
5,626 additions
and
360 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
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,34 @@ | ||
import { Metadata } from 'next' | ||
import { notFound } from 'next/navigation' | ||
|
||
import { getConfirmationByRoot } from '@/callers' | ||
import { | ||
Confirmation, | ||
ConfirmationOperations, | ||
ConfirmationOperationVotes, | ||
PageContainer, | ||
} from '@/components' | ||
import { createMetadata } from '@/config' | ||
import { ConfirmationFragment } from '@/graphql' | ||
import { getServerSideProps } from '@/helpers' | ||
|
||
const getConfirmation = (root: string) => { | ||
return getServerSideProps<ConfirmationFragment>(() => getConfirmationByRoot(root)) | ||
} | ||
|
||
export function generateMetadata({ params }: { params: { root: string } }): Metadata { | ||
return createMetadata(`Confirmation ${params.root} Details`) | ||
} | ||
|
||
export default async function ConfirmationPage({ params: { root } }: { params: { root: string } }) { | ||
const { isNotFound, indexes } = await getConfirmation(root) | ||
if (isNotFound) notFound() | ||
|
||
return ( | ||
<PageContainer> | ||
<Confirmation root={root} /> | ||
<ConfirmationOperations indexes={indexes} /> | ||
<ConfirmationOperationVotes indexes={indexes} /> | ||
</PageContainer> | ||
) | ||
} |
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,16 @@ | ||
import { Metadata } from 'next' | ||
|
||
import { Confirmations, PageContainer } from '@/components' | ||
import { createMetadata } from '@/config' | ||
|
||
export function generateMetadata(): Metadata { | ||
return createMetadata(`Confirmations`) | ||
} | ||
|
||
export default function ConfirmationsPage() { | ||
return ( | ||
<PageContainer> | ||
<Confirmations /> | ||
</PageContainer> | ||
) | ||
} |
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,27 @@ | ||
import { Metadata } from 'next' | ||
import { notFound } from 'next/navigation' | ||
|
||
import { getNetworkByName } from '@/callers' | ||
import { Network, PageContainer } from '@/components' | ||
import { createMetadata } from '@/config' | ||
import { NetworkFragment } from '@/graphql' | ||
import { getServerSideProps } from '@/helpers' | ||
|
||
const getNetwork = (name: string) => { | ||
return getServerSideProps<NetworkFragment>(() => getNetworkByName(name)) | ||
} | ||
|
||
export function generateMetadata({ params }: { params: { name: string } }): Metadata { | ||
return createMetadata(`Network ${params.name} Details`) | ||
} | ||
|
||
export default async function NetworkPage({ params: { name } }: { params: { name: string } }) { | ||
const { isNotFound } = await getNetwork(name) | ||
if (isNotFound) notFound() | ||
|
||
return ( | ||
<PageContainer> | ||
<Network name={name} /> | ||
</PageContainer> | ||
) | ||
} |
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,16 @@ | ||
import { Metadata } from 'next' | ||
|
||
import { Networks, PageContainer } from '@/components' | ||
import { createMetadata } from '@/config' | ||
|
||
export function generateMetadata(): Metadata { | ||
return createMetadata(`Networks`) | ||
} | ||
|
||
export default function NetworksPage() { | ||
return ( | ||
<PageContainer> | ||
<Networks /> | ||
</PageContainer> | ||
) | ||
} |
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,28 @@ | ||
import { Metadata } from 'next' | ||
import { notFound } from 'next/navigation' | ||
|
||
import { getOperationByIndex } from '@/callers' | ||
import { Operation, OperationVotes, PageContainer } from '@/components' | ||
import { createMetadata } from '@/config' | ||
import { GetOperationByIndexQuery } from '@/graphql' | ||
import { getServerSideProps } from '@/helpers' | ||
|
||
const getOperation = (index: string) => { | ||
return getServerSideProps<GetOperationByIndexQuery>(() => getOperationByIndex(index)) | ||
} | ||
|
||
export function generateMetadata({ params }: { params: { index: string } }): Metadata { | ||
return createMetadata(`Operation ${params.index} Details`) | ||
} | ||
|
||
export default async function OperationPage({ params: { index } }: { params: { index: string } }) { | ||
const { isNotFound } = await getOperation(index) | ||
if (isNotFound) notFound() | ||
|
||
return ( | ||
<PageContainer> | ||
<Operation index={index} /> | ||
<OperationVotes index={index} /> | ||
</PageContainer> | ||
) | ||
} |
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,16 @@ | ||
import { Metadata } from 'next' | ||
|
||
import { Operations, PageContainer } from '@/components' | ||
import { createMetadata } from '@/config' | ||
|
||
export function generateMetadata(): Metadata { | ||
return createMetadata(`Operations`) | ||
} | ||
|
||
export default function OperationsPage() { | ||
return ( | ||
<PageContainer> | ||
<Operations /> | ||
</PageContainer> | ||
) | ||
} |
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,33 @@ | ||
import { Metadata } from 'next' | ||
import { notFound } from 'next/navigation' | ||
|
||
import { getOracleByAddress } from '@/callers' | ||
import { getClient } from '@/client' | ||
import { AccountTransactions, Oracle, PageContainer } from '@/components' | ||
import { createMetadata } from '@/config' | ||
import { OracleFragment } from '@/graphql' | ||
import { getServerSideProps } from '@/helpers' | ||
|
||
const getOracle = async (address: string) => { | ||
return getServerSideProps<OracleFragment>(() => { | ||
return getOracleByAddress(address) | ||
}) | ||
} | ||
|
||
export function generateMetadata({ params }: { params: { address: string } }): Metadata { | ||
return createMetadata(`Oracle ${params.address} Details`) | ||
} | ||
|
||
export default async function OraclePage({ params: { address } }: { params: { address: string } }) { | ||
const { isNotFound } = await getOracle(address) | ||
if (isNotFound) notFound() | ||
|
||
const account = await getClient().query.getAccount(address) | ||
|
||
return ( | ||
<PageContainer> | ||
<Oracle address={address} /> | ||
<AccountTransactions sender={account.base_account.pub_key!} /> | ||
</PageContainer> | ||
) | ||
} |
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,16 @@ | ||
import { Metadata } from 'next' | ||
|
||
import { Oracles, PageContainer } from '@/components' | ||
import { createMetadata } from '@/config' | ||
|
||
export function generateMetadata(): Metadata { | ||
return createMetadata('Oracles') | ||
} | ||
|
||
export default function OraclesPage() { | ||
return ( | ||
<PageContainer> | ||
<Oracles /> | ||
</PageContainer> | ||
) | ||
} |
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,31 @@ | ||
import { Metadata } from 'next' | ||
import { notFound } from 'next/navigation' | ||
|
||
import { getCollectionByIndex } from '@/callers' | ||
import { PageContainer, SupportedToken } from '@/components' | ||
import { createMetadata } from '@/config' | ||
import { CollectionFragment } from '@/graphql' | ||
import { getServerSideProps } from '@/helpers' | ||
|
||
const getCollection = (index: string) => { | ||
return getServerSideProps<CollectionFragment>(() => getCollectionByIndex(index)) | ||
} | ||
|
||
export function generateMetadata({ params }: { params: { index: string } }): Metadata { | ||
return createMetadata(`Supported Token ${params.index} Details`) | ||
} | ||
|
||
export default async function SupportedTokenPage({ | ||
params: { index }, | ||
}: { | ||
params: { index: string } | ||
}) { | ||
const { isNotFound } = await getCollection(index) | ||
if (isNotFound) notFound() | ||
|
||
return ( | ||
<PageContainer> | ||
<SupportedToken index={index} /> | ||
</PageContainer> | ||
) | ||
} |
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,16 @@ | ||
import { Metadata } from 'next' | ||
|
||
import { PageContainer, SupportedTokens } from '@/components' | ||
import { createMetadata } from '@/config' | ||
|
||
export function generateMetadata(): Metadata { | ||
return createMetadata(`Supported Tokens`) | ||
} | ||
|
||
export default function SupportedTokensPage() { | ||
return ( | ||
<PageContainer> | ||
<SupportedTokens /> | ||
</PageContainer> | ||
) | ||
} |
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,31 @@ | ||
import { Metadata } from 'next' | ||
import { notFound } from 'next/navigation' | ||
|
||
import { getTSSByAddress } from '@/callers' | ||
import { getClient } from '@/client' | ||
import { AccountTransactions, PageContainer, TSSDetails } from '@/components' | ||
import { createMetadata } from '@/config' | ||
import { TssFragment } from '@/graphql' | ||
import { getServerSideProps } from '@/helpers' | ||
|
||
const getTSS = (address: string) => { | ||
return getServerSideProps<TssFragment>(() => getTSSByAddress(address)) | ||
} | ||
|
||
export function generateMetadata({ params }: { params: { address: string } }): Metadata { | ||
return createMetadata(`TSS ${params.address} Details`) | ||
} | ||
|
||
export default async function TSSPage({ params: { address } }: { params: { address: string } }) { | ||
const { isNotFound } = await getTSS(address) | ||
if (isNotFound) notFound() | ||
|
||
const account = await getClient().query.getAccount(address) | ||
|
||
return ( | ||
<PageContainer> | ||
<TSSDetails address={address} /> | ||
<AccountTransactions sender={account.base_account.pub_key!} /> | ||
</PageContainer> | ||
) | ||
} |
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,16 @@ | ||
import { Metadata } from 'next' | ||
|
||
import { PageContainer, TSSs } from '@/components' | ||
import { createMetadata } from '@/config' | ||
|
||
export function generateMetadata(): Metadata { | ||
return createMetadata('TSS') | ||
} | ||
|
||
export default function TSSsPage() { | ||
return ( | ||
<PageContainer> | ||
<TSSs /> | ||
</PageContainer> | ||
) | ||
} |
Oops, something went wrong.