Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
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
LuckySwap
interface
Commits
147a9bcb
Unverified
Commit
147a9bcb
authored
Sep 06, 2023
by
Zach Pomerantz
Committed by
GitHub
Sep 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: move off deprecated gql fields (#7269)
parent
652a8305
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
411 additions
and
2327 deletions
+411
-2327
full_activity.json
cypress/fixtures/mini-portfolio/full_activity.json
+387
-2305
parseRemote.tsx
...ents/AccountDrawer/MiniPortfolio/Activity/parseRemote.tsx
+6
-3
activity.graphql
src/graphql/data/activity.graphql
+18
-19
No files found.
cypress/fixtures/mini-portfolio/full_activity.json
View file @
147a9bcb
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/components/AccountDrawer/MiniPortfolio/Activity/parseRemote.tsx
View file @
147a9bcb
...
...
@@ -351,7 +351,7 @@ function parseRemoteActivity(assetActivity: AssetActivityPartsFragment): Activit
return
parseUniswapXOrder
(
assetActivity
as
OrderActivity
)
}
const
changes
=
assetActivity
.
assetChanges
.
reduce
(
const
changes
=
assetActivity
.
details
.
assetChanges
.
reduce
(
(
acc
:
TransactionChanges
,
assetChange
)
=>
{
if
(
assetChange
.
__typename
===
'
NftApproval
'
)
acc
.
NftApproval
.
push
(
assetChange
)
else
if
(
assetChange
.
__typename
===
'
NftApproveForAll
'
)
acc
.
NftApproveForAll
.
push
(
assetChange
)
...
...
@@ -377,13 +377,16 @@ function parseRemoteActivity(assetActivity: AssetActivityPartsFragment): Activit
status
:
assetActivity
.
details
.
status
,
timestamp
:
assetActivity
.
timestamp
,
logos
:
getLogoSrcs
(
changes
),
title
:
assetActivity
.
type
,
title
:
assetActivity
.
details
.
type
,
descriptor
:
assetActivity
.
details
.
to
,
from
:
assetActivity
.
details
.
from
,
nonce
:
assetActivity
.
details
.
nonce
,
}
const
parsedFields
=
ActivityParserByType
[
assetActivity
.
type
]?.(
changes
,
assetActivity
as
TransactionActivity
)
const
parsedFields
=
ActivityParserByType
[
assetActivity
.
details
.
type
]?.(
changes
,
assetActivity
as
TransactionActivity
)
return
{
...
defaultFields
,
...
parsedFields
}
}
catch
(
e
)
{
console
.
error
(
'
Failed to parse activity
'
,
e
,
assetActivity
)
...
...
src/graphql/data/activity.graphql
View file @
147a9bcb
...
...
@@ -110,6 +110,24 @@ fragment TransactionDetailsParts on TransactionDetails {
hash
nonce
status
assetChanges
{
__typename
...
on
TokenTransfer
{
...
TokenTransferParts
}
...
on
NftTransfer
{
...
NFTTransferParts
}
...
on
TokenApproval
{
...
TokenApprovalParts
}
...
on
NftApproval
{
...
NFTApprovalParts
}
...
on
NftApproveForAll
{
...
NFTApproveForAllParts
}
}
}
fragment
SwapOrderDetailsParts
on
SwapOrderDetails
{
...
...
@@ -130,7 +148,6 @@ fragment SwapOrderDetailsParts on SwapOrderDetails {
fragment
AssetActivityParts
on
AssetActivity
{
id
timestamp
type
chain
details
{
__typename
...
...
@@ -141,24 +158,6 @@ fragment AssetActivityParts on AssetActivity {
...
SwapOrderDetailsParts
}
}
assetChanges
{
__typename
...
on
TokenTransfer
{
...
TokenTransferParts
}
...
on
NftTransfer
{
...
NFTTransferParts
}
...
on
TokenApproval
{
...
TokenApprovalParts
}
...
on
NftApproval
{
...
NFTApprovalParts
}
...
on
NftApproveForAll
{
...
NFTApproveForAllParts
}
}
}
# TODO(UniswapX): return to a pagesize of 50 pre-launch
...
...
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