-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for searching for accounts by name
- Loading branch information
Showing
8 changed files
with
158 additions
and
2 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
20 changes: 20 additions & 0 deletions
20
src/app/pages/AccountDetailsPage/DeferredConsensusAccountDetails.tsx
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,20 @@ | ||
import { FC } from 'react' | ||
import { AllTokenPrices } from '../../../coin-gecko/api' | ||
import { Network } from '../../../types/network' | ||
|
||
/** | ||
* Load and display details of a RuntimeAccount | ||
*/ | ||
export const DeferredConsensusAccountDetails: FC<{ | ||
network: Network | ||
address: string | ||
tokenPrices: AllTokenPrices | ||
showLayer?: boolean | ||
}> = () => | ||
// { | ||
// network, address, tokenPrices, highlightedPartOfName, showLayer | ||
// }, | ||
{ | ||
// TODO: load and display consensus account details when API and component becomes available | ||
return null | ||
} |
27 changes: 27 additions & 0 deletions
27
src/app/pages/AccountDetailsPage/DeferredRuntimeAccountDetails.tsx
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 { FC } from 'react' | ||
import { Runtime, useGetRuntimeAccountsAddress } from '../../../oasis-nexus/api' | ||
import { AllTokenPrices } from '../../../coin-gecko/api' | ||
import { AccountDetailsView } from './AccountDetailsView' | ||
import { Network } from '../../../types/network' | ||
|
||
/** | ||
* Load and display details of a RuntimeAccount | ||
*/ | ||
export const DeferredRuntimeAccountDetails: FC<{ | ||
network: Network | ||
layer: Runtime | ||
address: string | ||
tokenPrices: AllTokenPrices | ||
showLayer?: boolean | ||
}> = ({ network, layer, address, tokenPrices, showLayer }) => { | ||
const { data, isLoading, isError } = useGetRuntimeAccountsAddress(network, layer, address) | ||
return ( | ||
<AccountDetailsView | ||
isLoading={isLoading} | ||
isError={isError} | ||
account={data?.data} | ||
tokenPrices={tokenPrices} | ||
showLayer={showLayer} | ||
/> | ||
) | ||
} |
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