mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
migrate PoolTransactions queries
This commit is contained in:
parent
18d7223297
commit
2af3b68603
@ -23,23 +23,31 @@ const txHistoryQueryByPool = gql`
|
||||
poolTransactions(
|
||||
orderBy: timestamp
|
||||
orderDirection: desc
|
||||
where: { userAddress: $user, poolAddress: $pool }
|
||||
where: { user: $user, pool: $pool }
|
||||
first: 1000
|
||||
subgraphError: deny
|
||||
) {
|
||||
tokens {
|
||||
poolToken {
|
||||
id
|
||||
symbol
|
||||
}
|
||||
baseToken {
|
||||
id
|
||||
value
|
||||
type
|
||||
tokenAddress
|
||||
token {
|
||||
symbol
|
||||
address
|
||||
}
|
||||
}
|
||||
datatoken {
|
||||
id
|
||||
value
|
||||
token {
|
||||
symbol
|
||||
address
|
||||
}
|
||||
}
|
||||
type
|
||||
tx
|
||||
event
|
||||
timestamp
|
||||
poolAddress {
|
||||
datatokenAddress
|
||||
pool {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -49,23 +57,31 @@ const txHistoryQuery = gql`
|
||||
poolTransactions(
|
||||
orderBy: timestamp
|
||||
orderDirection: desc
|
||||
where: { userAddress: $user }
|
||||
where: { user: $user }
|
||||
first: 1000
|
||||
subgraphError: deny
|
||||
) {
|
||||
tokens {
|
||||
poolToken {
|
||||
id
|
||||
symbol
|
||||
}
|
||||
baseToken {
|
||||
id
|
||||
value
|
||||
type
|
||||
tokenAddress
|
||||
token {
|
||||
symbol
|
||||
address
|
||||
}
|
||||
}
|
||||
datatoken {
|
||||
id
|
||||
value
|
||||
token {
|
||||
symbol
|
||||
address
|
||||
}
|
||||
}
|
||||
type
|
||||
tx
|
||||
event
|
||||
timestamp
|
||||
poolAddress {
|
||||
datatokenAddress
|
||||
pool {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -170,9 +186,9 @@ export default function PoolTransactions({
|
||||
const didList: string[] = []
|
||||
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const { datatokenAddress } = data[i].poolAddress
|
||||
const { address } = data[i].datatoken.token
|
||||
const did = web3.utils
|
||||
.toChecksumAddress(datatokenAddress)
|
||||
.toChecksumAddress(address)
|
||||
.replace('0x', 'did:op:')
|
||||
didList.push(did)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user