Commit 1782111 1 parent 9837a71 commit 1782111 Copy full SHA for 1782111
File tree 4 files changed +22
-6
lines changed
4 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,11 @@ clone this repository and run
60
60
```sh
61
61
docker-compose up
62
62
```
63
+ OR
64
+
65
+ ``` sh
66
+ docker-compose --env-file .env up | grep -a -E --color ' WARN.*|$'
67
+ ```
63
68
64
69
This will start IPFS, Postgres and Graph Node in Docker and create persistent
65
70
data directories for IPFS and Postgres in ` ./data/ipfs ` and ` ./data/postgres ` . You
Original file line number Diff line number Diff line change @@ -231,13 +231,13 @@ type PoolTransaction @entity {
231
231
"base tokens transfered"
232
232
baseToken : Token
233
233
234
- "number of base tokens transfered, if value is negative it means it was removed"
234
+ "number of base tokens transfered, for type SWAP if value is negative it means it was removed"
235
235
baseTokenValue : BigDecimal
236
236
237
237
"datatokens transfered"
238
238
datatoken : Token
239
239
240
- "number of datatokens transfered, if value is negative it means it was removed"
240
+ "number of datatokens transfered, for type SWAP if value is negative it means it was removed"
241
241
datatokenValue : BigDecimal
242
242
}
243
243
Original file line number Diff line number Diff line change @@ -87,12 +87,12 @@ export function handleExit(event: LOG_EXIT): void {
87
87
)
88
88
if ( token . isDatatoken ) {
89
89
poolTx . datatoken = token . id
90
- poolTx . datatokenValue = ammount . neg ( )
90
+ poolTx . datatokenValue = ammount
91
91
92
92
pool . datatokenLiquidity = pool . datatokenLiquidity . minus ( ammount )
93
93
} else {
94
94
poolTx . baseToken = token . id
95
- poolTx . baseTokenValue = ammount . neg ( )
95
+ poolTx . baseTokenValue = ammount
96
96
97
97
pool . baseTokenLiquidity = pool . baseTokenLiquidity . minus ( ammount )
98
98
removeLiquidity ( token . id , ammount )
Original file line number Diff line number Diff line change @@ -17,16 +17,27 @@ export function getPoolShareId(
17
17
return `${ poolAddress } -${ userAddress } `
18
18
}
19
19
20
+ export function getPoolTransactionId (
21
+ txHash : string ,
22
+ userAddress : string
23
+ ) : string {
24
+ return `${ txHash } -${ userAddress } `
25
+ }
26
+
20
27
export function getPoolTransaction (
21
28
event : ethereum . Event ,
22
29
userAddress : string ,
23
30
type : string
24
31
) : PoolTransaction {
25
- let poolTx = PoolTransaction . load ( event . transaction . hash . toHex ( ) )
32
+ const txId = getPoolTransactionId (
33
+ event . transaction . hash . toHexString ( ) ,
34
+ userAddress
35
+ )
36
+ let poolTx = PoolTransaction . load ( txId )
26
37
27
38
// create pool transaction and fill basic fields
28
39
if ( poolTx === null ) {
29
- poolTx = new PoolTransaction ( event . transaction . hash . toHex ( ) )
40
+ poolTx = new PoolTransaction ( txId )
30
41
31
42
poolTx . user = userAddress
32
43
poolTx . pool = event . address . toHex ( )
You can’t perform that action at this time.
0 commit comments