Skip to content

Commit

Permalink
fix: tslint + build
Browse files Browse the repository at this point in the history
  • Loading branch information
Tien Nam Dao committed Oct 12, 2022
1 parent 3572f61 commit fd807d1
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 20 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"license": "MIT",
"dependencies": {
"@astradefi/address-converter": "^0.4.1",
"@astraprotocol/astra-ui": "^1.0.9",
"@astraprotocol/astra-ui": "^1.0.10",
"@cosmjs/crypto": "^0.29.0",
"@cosmjs/encoding": "^0.29.0",
"@reduxjs/toolkit": "^1.8.5",
Expand Down
14 changes: 10 additions & 4 deletions project.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,13 @@ interface UseAddressBalanceData {
lastBalanceUpdate: number
}

interface AddressCounterData {
gasUsageCount?: number
tokenTransferCount?: number
transactionCount?: number
validationCount?: number
}

interface UseAddressCoinBalanceHistoryData {
result: AddressCoinBalanceHistory[] | []
hasNextPage: boolean
Expand All @@ -276,10 +283,9 @@ interface TopAstraHolderResponse {
}

interface AddressCounterResponse {
gasUsageCount: number
tokenTransferCount: number
transactionCount: number
validationCount: number
message: string
result: AddressCounterData
status: string
}

interface AddressBalanceResponse {
Expand Down
2 changes: 1 addition & 1 deletion views/accounts/HolderRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function HolderRow({ index, account }: Props) {
>
<div className={clsx('text text-base contrast-color-70 text-center margin-right-lg')}>{index}</div>
<div className={clsx(styles.borderLeft, 'col-5 padding-left-lg block-ver-center')}>
<Typography.LinkText href={LinkMaker.address(account.address)} className={['text', 'text-base']}>
<Typography.LinkText href={LinkMaker.address(account.address)} classes={'text text-base'}>
{account.address}
</Typography.LinkText>
</div>
Expand Down
2 changes: 1 addition & 1 deletion views/accounts/hook/useAddressCounter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useEffect, useState } from 'react'
import useSWR from 'swr'

export default function useAddressCounter(address: string) {
const [hookData, setState] = useState<AddressCounterResponse>({})
const [hookData, setState] = useState<AddressCounterData>({})

const _fetchCondition = () => {
return [
Expand Down
2 changes: 1 addition & 1 deletion views/accounts/hook/useAddressTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function useAddressTransactions(address: string, page: number) {
}
]
}
const { data } = useSWR<>(_fetchCondition())
const { data } = useSWR<any>(_fetchCondition())

useEffect(() => {
if (data) {
Expand Down
16 changes: 8 additions & 8 deletions views/block/BlockRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,10 @@ export default function BlockRow({
{mine ? (
<span className={clsx('money', 'money-sm')}>#{blockNumber}</span>
) : (
<Typography.LinkText
href={LinkMaker.block(blockNumber)}
children={`#${blockNumber}`}
className={['money', 'money-sm']}
/>
<Typography.LinkText href={LinkMaker.block(blockNumber)} classes={'money money-sm'}>
{' '}
#{blockNumber}
</Typography.LinkText>
)}
</div>
{mine ? (
Expand All @@ -64,9 +63,10 @@ export default function BlockRow({
<div>
<Typography.LinkText
href={LinkMaker.address(proposerAddress)}
children={proposerAddress}
className={['money', 'money-sm']}
/>
classes={'money money-sm'}
>
{proposerAddress}
</Typography.LinkText>
</div>
<div className={clsx('block-ver-center', styles.info)}>
<div className="block-ver-center">
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
link-module-alias "^1.2.0"
shx "^0.3.4"

"@astraprotocol/astra-ui@^1.0.9":
version "1.0.9"
resolved "https://npm.pkg.github.com/download/@astraprotocol/astra-ui/1.0.9/6fe4cc47af3a1d080571add7df559a3e882da304#6fe4cc47af3a1d080571add7df559a3e882da304"
integrity sha512-JxQ8eMw44Puayy5LSQs1mFvnKftH/UiNAUgmnzn0kNxSXkwSUWbhLLfOUf9qVUYU+aqm4fpfErNh13nkYwSNHg==
"@astraprotocol/astra-ui@^1.0.10":
version "1.0.10"
resolved "https://npm.pkg.github.com/download/@astraprotocol/astra-ui/1.0.10/fb77d8285d56494856ef04618c281535c1bd3510#fb77d8285d56494856ef04618c281535c1bd3510"
integrity sha512-fBjiYPPwZdhwI/FY0XyizOy9S0CXMctV3B4hqbBCNng5bQf6fuAM5jZRfHP263OJbWw0qMHoCVtwB16JIwkHsg==
dependencies:
clsx "^1.2.1"
react "^18.2.0"
Expand Down

0 comments on commit fd807d1

Please sign in to comment.