Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changelog/1781.internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update API bindings
3 changes: 2 additions & 1 deletion src/app/components/ConsensusTransactionMethod/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -383,4 +383,5 @@ export type ConsensusTxMethodFilterOption = ConsensusTxMethod | 'any'

export const getConsensusTransactionMethodFilteringParam = (
method: ConsensusTxMethodFilterOption,
): Partial<GetConsensusTransactionsParams> => (method === 'any' ? {} : { method })
): Partial<GetConsensusTransactionsParams> =>
method === 'any' ? {} : { method: method as unknown as ConsensusTxMethod[] }
6 changes: 3 additions & 3 deletions src/app/components/RuntimeTransactionMethod/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export const getRuntimeTransactionMethodFilteringParam = (
//
// For more details, see the API spec at
// https://github.com/oasisprotocol/nexus/blob/main/api/spec/v1.yaml
return { method: 'native_transfers' }
return { method: 'native_transfers' as unknown as string[] }
case 'evm.Call':
// Searching for contract calls is tricky, because some of them
// should be classified as transfers. (See above.)
Expand All @@ -176,9 +176,9 @@ export const getRuntimeTransactionMethodFilteringParam = (
//
// For more details, see the API spec at
// https://github.com/oasisprotocol/nexus/blob/main/api/spec/v1.yaml
return { method: 'evm.Call_no_native' }
return { method: 'evm.Call_no_native' as unknown as string[] }
default:
// For other (normal) methods, we can simply pass on the wanted method name.
return { method }
return { method: method as unknown as string[] }
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FC } from 'react'
import { useGetConsensusTransactions } from '../../../oasis-nexus/api'
import { ConsensusTxMethod, useGetConsensusTransactions } from '../../../oasis-nexus/api'
import { NUMBER_OF_ITEMS_ON_SEPARATE_PAGE as limit } from '../../config'
import { ConsensusTransactions } from '../../components/Transactions'
import { useSearchParamsPagination } from '../../components/Table/useSearchParamsPagination'
Expand Down Expand Up @@ -42,7 +42,7 @@ const ConsensusAccountTransactions: FC<ConsensusAccountDetailsContext> = ({ scop
limit,
offset,
rel: address,
method: method === 'any' ? undefined : method,
method: method === 'any' ? undefined : (method as unknown as ConsensusTxMethod[]),
})
const { isLoading, data } = transactionsQuery
const transactions = data?.data.transactions
Expand Down
6 changes: 4 additions & 2 deletions src/oasis-nexus/generated/api.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.