@@ -115,18 +115,22 @@ GoldRushDecoder.on(
115
115
) ;
116
116
tokens . push ( {
117
117
heading : `Matched to ${ decoded . buy . trader } ` ,
118
- value : decoded . sell . amount . toString ( ) || decoded . buy . amount . toString ( ) ,
118
+ value :
119
+ decoded . sell . amount . toString ( ) || decoded . buy . amount . toString ( ) ,
119
120
decimals :
120
121
tokenPriceData ?. [ 0 ] ?. items ?. [ 0 ] ?. contract_metadata
121
122
?. contract_decimals ?? 18 ,
122
123
pretty_quote : prettifyCurrency (
123
124
tokenPriceData ?. [ 0 ] ?. items ?. [ 0 ] ?. price *
124
- ( Number ( decoded . sell . amount . toString ( ) || decoded . buy . amount . toString ( ) ) /
125
- Math . pow (
126
- 10 ,
127
- tokenPriceData ?. [ 0 ] ?. items ?. [ 0 ] ?. contract_metadata
128
- ?. contract_decimals ?? 18
129
- ) )
125
+ ( Number (
126
+ decoded . sell . amount . toString ( ) ||
127
+ decoded . buy . amount . toString ( )
128
+ ) /
129
+ Math . pow (
130
+ 10 ,
131
+ tokenPriceData ?. [ 0 ] ?. items ?. [ 0 ] ?. contract_metadata
132
+ ?. contract_decimals ?? 18
133
+ ) )
130
134
) ,
131
135
ticker_symbol :
132
136
tokenPriceData ?. [ 0 ] ?. items ?. [ 0 ] ?. contract_metadata
@@ -139,7 +143,8 @@ GoldRushDecoder.on(
139
143
await covalent_client . NftService . getNftMetadataForGivenTokenIdForContract (
140
144
chain_name ,
141
145
decoded . sell . collection || decoded . buy . collection ,
142
- decoded . sell . tokenId . toString ( ) || decoded . buy . tokenId . toString ( ) ,
146
+ decoded . sell . tokenId . toString ( ) ||
147
+ decoded . buy . tokenId . toString ( ) ,
143
148
{
144
149
withUncached : true ,
145
150
}
@@ -148,24 +153,21 @@ GoldRushDecoder.on(
148
153
heading : `Matched to ${ decoded . buy . trader } ` ,
149
154
collection_address : data ?. items ?. [ 0 ] ?. contract_address ,
150
155
collection_name :
151
- data ?. items ?. [ 0 ] ?. nft_data ?. external_data ?. name ||
152
- null ,
156
+ data ?. items ?. [ 0 ] ?. nft_data ?. external_data ?. name || null ,
153
157
token_identifier :
154
- data ?. items ?. [ 0 ] ?. nft_data ?. token_id ?. toString ( ) ||
155
- null ,
158
+ data ?. items ?. [ 0 ] ?. nft_data ?. token_id ?. toString ( ) || null ,
156
159
images : {
157
160
"1024" :
158
- data ?. items ?. [ 0 ] ?. nft_data ?. external_data
159
- ?. image_1024 || null ,
161
+ data ?. items ?. [ 0 ] ?. nft_data ?. external_data ?. image_1024 ||
162
+ null ,
160
163
"512" :
161
- data ?. items ?. [ 0 ] ?. nft_data ?. external_data
162
- ?. image_512 || null ,
164
+ data ?. items ?. [ 0 ] ?. nft_data ?. external_data ?. image_512 ||
165
+ null ,
163
166
"256" :
164
- data ?. items ?. [ 0 ] ?. nft_data ?. external_data
165
- ?. image_256 || null ,
167
+ data ?. items ?. [ 0 ] ?. nft_data ?. external_data ?. image_256 ||
168
+ null ,
166
169
default :
167
- data ?. items ?. [ 0 ] ?. nft_data ?. external_data
168
- ?. image || null ,
170
+ data ?. items ?. [ 0 ] ?. nft_data ?. external_data ?. image || null ,
169
171
} ,
170
172
} ) ;
171
173
0 commit comments