Skip to content

wrong from address when fetching multiple swaps #171

Open
@simple-marvin

Description

@simple-marvin

Hey guys, so i tried to fetch multiple swaps the from address is the null address (0x000...000), but when i just try to get one of those swaps where the from address is null and just try to fetch them directly by id, i get the correct from address.

While i wrote this i tried different stuff out and found out, its not about the query, its about the time when fetching it, so sometimes the multiple swaps query works and sometimes dont.
But when i first try to run the multiple swaps query and then the single swap query, it seems like i refresh it in a way which then returns me the correct from address.

i know my description is bit confusing, its because i am confused my self, sometimes it works and sometimes it doesnt, i dont get it, but its a problem when i try to fetch multiple swaps the from address is 0x000...000.

reduced query to replicate the issue:
{ swaps( first: 1, where: { id:"0xfb2580fdcea1a32800ca28d5e892ce495b5b24c5629f94daa99044aa8ca87a74-1" } ){ id from amount0In } }

result for that query:
{ "data": { "swaps": [ { "from": "0x0000000000000000000000000000000000000000", "id": "0xfb2580fdcea1a32800ca28d5e892ce495b5b24c5629f94daa99044aa8ca87a74-1", "amount0In": "294876321.807129226", } ] } }

Query to directly get that swap:
{ swap( id: "0xfb2580fdcea1a32800ca28d5e892ce495b5b24c5629f94daa99044aa8ca87a74-1" ){ id from amount0In } }

Result:
{ "data": { "swap": { "amount0In": "294876321.807129226", "from": "0x6e79bba75c5ceb1b33cadafc1f6c945e5795742c", "id": "0xfb2580fdcea1a32800ca28d5e892ce495b5b24c5629f94daa99044aa8ca87a74-1" } } }

Kind Regards
Marvin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions