-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
318 additions
and
407 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
NEXT_PUBLIC_NETWORK_TYPE = 'TESTNET' | ||
NEXT_PUBLIC_SYMBOL = 'ELF' | ||
NEXT_PUBLIC_API_URL=http://localhost:4000 | ||
NEXT_PUBLIC_API_URL=https://aelfscan.io | ||
NEXT_PUBLIC_REMOTE_URL=http://localhost:3001 |
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,6 +1,6 @@ | ||
NEXT_PUBLIC_NETWORK_TYPE = 'TESTNET' | ||
NEXT_PUBLIC_CHAIN_ID = 'AELF' | ||
NEXT_PUBLIC_SYMBOL = 'ELF' | ||
NEXT_PUBLIC_API_URL = http://192.168.10.179:8001 | ||
NEXT_PUBLIC_API_URL = https://aelfscan.io | ||
NEXT_PUBLIC_REMOTE_URL = http://localhost:3001 | ||
NEXT_PUBLIC_CMS_URL = http://192.168.66.62:3200 |
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 |
---|---|---|
@@ -1,42 +1,47 @@ | ||
import request from '@_api'; | ||
import { IBlocksDetailData, IBlocksDetailRequestParams, IBlocksRequestParams, TChainID } from './type'; | ||
|
||
const defaultTokenList = { | ||
total: 0, | ||
blocks: [], | ||
}; | ||
|
||
export async function fetchBlocks(params: IBlocksRequestParams) { | ||
const result = await request.block.getBlockList({ | ||
params: params, | ||
}); | ||
const { data } = result; | ||
const data = result?.data || defaultTokenList; | ||
return data; | ||
} | ||
|
||
export async function fetchLatestBlocksList(params: { chainId: TChainID }) { | ||
const result = await request.block.getLatestBlocksList({ | ||
params: params, | ||
}); | ||
const { data } = result; | ||
const data = result?.data || defaultTokenList; | ||
return data; | ||
} | ||
|
||
export async function fetchServerBlocks(params: IBlocksRequestParams) { | ||
const result = await request.block.getServerBlockList({ | ||
params: params, | ||
}); | ||
const { data } = result; | ||
const data = result?.data || defaultTokenList; | ||
return data; | ||
} | ||
|
||
export async function fetchServerBlocksDetail(params: IBlocksDetailRequestParams): Promise<IBlocksDetailData> { | ||
const result = await request.block.getServerBlockDetail({ | ||
params: params, | ||
}); | ||
const { data } = result; | ||
const data = result?.data; | ||
return data; | ||
} | ||
|
||
export async function fetchBlocksDetail(params: IBlocksDetailRequestParams): Promise<IBlocksDetailData> { | ||
const result = await request.block.getBlockDetail({ | ||
params: params, | ||
}); | ||
const { data } = result; | ||
const data = result?.data || {}; | ||
return data; | ||
} |
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,45 @@ | ||
import request from '@_api'; | ||
import { | ||
ITokenHoldersRequestParams, | ||
ITokenTransfersRequestParams, | ||
ITokenDetailRequestParams, | ||
TTokenListRequestParams, | ||
} from './type'; | ||
import { IHolderTableData, ITokenDetail, ITokenList, ITransferTableData } from '@app/[chain]/token/[tokenSymbol]/type'; | ||
|
||
export async function fetchTokenList(params: TTokenListRequestParams): Promise<ITokenList> { | ||
const result = await request.tx.getTransactionDetail({ | ||
params: params, | ||
}); | ||
const data = result?.data; | ||
return data; | ||
} | ||
export async function fetchServerTokenList(params: TTokenListRequestParams): Promise<ITokenList> { | ||
const result = await request.tx.getTransactionDetail({ | ||
params: params, | ||
}); | ||
const data = result?.data; | ||
return data; | ||
} | ||
export async function fetchTokenDetail(params: ITokenDetailRequestParams): Promise<ITokenDetail> { | ||
const result = await request.tx.getTransactionDetail({ | ||
params: params, | ||
}); | ||
const data = result?.data; | ||
return data; | ||
} | ||
export async function fetchTokenDetailTransfers(params: ITokenTransfersRequestParams): Promise<ITransferTableData> { | ||
const result = await request.tx.getTransactionDetail({ | ||
params: params, | ||
}); | ||
const data = result?.data; | ||
return data; | ||
} | ||
|
||
export async function fetchTokenDetailHolders(params: ITokenHoldersRequestParams): Promise<IHolderTableData> { | ||
const result = await request.tx.getTransactionDetail({ | ||
params: params, | ||
}); | ||
const data = result?.data; | ||
return data; | ||
} |
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,7 @@ | ||
export default function DollarCurrency({ price }: { price: string }) { | ||
return ( | ||
<div className="ml-1 flex h-6 cursor-pointer items-center rounded bg-ECEEF2 px-4"> | ||
<span className="mr-1">${price}</span> | ||
</div> | ||
); | ||
} |
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
Oops, something went wrong.