Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
21327f3e
Commit
21327f3e
authored
May 26, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skeletons for watchlist txs
parent
70d95e92
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
9 deletions
+17
-9
resources.ts
lib/api/resources.ts
+1
-1
transaction.ts
types/api/transaction.ts
+3
-3
Transactions.tsx
ui/pages/Transactions.tsx
+11
-1
TxsContent.tsx
ui/txs/TxsContent.tsx
+0
-1
TxsHeaderMobile.tsx
ui/txs/TxsHeaderMobile.tsx
+2
-3
No files found.
lib/api/resources.ts
View file @
21327f3e
...
...
@@ -191,7 +191,7 @@ export const RESOURCES = {
},
txs_watchlist
:
{
path
:
'
/api/v2/transactions/watchlist
'
,
paginationFields
:
[
'
filter
'
as
const
,
'
hash
'
as
const
,
'
inserted_a
t
'
as
const
],
paginationFields
:
[
'
block_number
'
as
const
,
'
index
'
as
const
,
'
items_coun
t
'
as
const
],
filterFields
:
[
],
},
tx
:
{
...
...
types/api/transaction.ts
View file @
21327f3e
...
...
@@ -74,9 +74,9 @@ export interface TransactionsResponsePending {
export
interface
TransactionsResponseWatchlist
{
items
:
Array
<
Transaction
>
;
next_page_params
:
{
inserted_at
:
string
;
hash
:
string
;
filter
:
'
pending
'
;
block_number
:
number
;
index
:
number
;
items_count
:
50
;
}
|
null
;
}
...
...
ui/pages/Transactions.tsx
View file @
21327f3e
...
...
@@ -44,6 +44,11 @@ const Transactions = () => {
resourceName
:
'
txs_watchlist
'
,
options
:
{
enabled
:
router
.
query
.
tab
===
'
watchlist
'
,
placeholderData
:
generateListStub
<
'
txs_watchlist
'
>
(
TX
,
50
,
{
next_page_params
:
{
block_number
:
9005713
,
index
:
5
,
items_count
:
50
,
}
}),
},
});
...
...
@@ -82,7 +87,12 @@ const Transactions = () => {
<
RoutedTabs
tabs=
{
tabs
}
tabListProps=
{
isMobile
?
undefined
:
TAB_LIST_PROPS
}
rightSlot=
{
<
TxsTabSlot
pagination=
{
txsQuery
.
pagination
}
isPaginationVisible=
{
txsQuery
.
isPaginationVisible
&&
!
isMobile
}
/>
}
rightSlot=
{
(
<
TxsTabSlot
pagination=
{
router
.
query
.
tab
===
'
watchlist
'
?
txsWatchlistQuery
.
pagination
:
txsQuery
.
pagination
}
isPaginationVisible=
{
txsQuery
.
isPaginationVisible
&&
!
isMobile
}
/>
)
}
stickyEnabled=
{
!
isMobile
}
/>
</>
...
...
ui/txs/TxsContent.tsx
View file @
21327f3e
...
...
@@ -97,7 +97,6 @@ const TxsContent = ({
setSorting=
{
setSortByValue
}
paginationProps=
{
query
.
pagination
}
showPagination=
{
query
.
isPaginationVisible
}
isLoading=
{
query
.
pagination
.
isLoading
}
filterComponent=
{
filter
}
linkSlot=
{
currentAddress
?
<
AddressCsvExportLink
address=
{
currentAddress
}
type=
"transactions"
ml=
{
2
}
isLoading=
{
query
.
pagination
.
isLoading
}
/>
:
null
...
...
ui/txs/TxsHeaderMobile.tsx
View file @
21327f3e
...
...
@@ -28,10 +28,9 @@ type Props = {
showPagination
?:
boolean
;
filterComponent
?:
React
.
ReactNode
;
linkSlot
?:
React
.
ReactNode
;
isLoading
?:
boolean
;
}
const
TxsHeaderMobile
=
({
filterComponent
,
sorting
,
setSorting
,
paginationProps
,
className
,
showPagination
=
true
,
linkSlot
,
isLoading
}:
Props
)
=>
{
const
TxsHeaderMobile
=
({
filterComponent
,
sorting
,
setSorting
,
paginationProps
,
className
,
showPagination
=
true
,
linkSlot
}:
Props
)
=>
{
return
(
<
ActionBar
className=
{
className
}
>
<
HStack
>
...
...
@@ -40,7 +39,7 @@ const TxsHeaderMobile = ({ filterComponent, sorting, setSorting, paginationProps
options=
{
SORT_OPTIONS
}
setSort=
{
setSorting
}
sort=
{
sorting
}
isLoading=
{
isLoading
}
isLoading=
{
paginationProps
.
isLoading
}
/>
{
/* api is not implemented */
}
{
/* <FilterInput
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment