Skip to content

Commit 4dfd39e

Browse files
committed
fix lint errors
1 parent 6b2a950 commit 4dfd39e

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

services/decoder/protocols/blur/blur.decoders.ts

+22-20
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,22 @@ GoldRushDecoder.on(
115115
);
116116
tokens.push({
117117
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(),
119120
decimals:
120121
tokenPriceData?.[0]?.items?.[0]?.contract_metadata
121122
?.contract_decimals ?? 18,
122123
pretty_quote: prettifyCurrency(
123124
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+
))
130134
),
131135
ticker_symbol:
132136
tokenPriceData?.[0]?.items?.[0]?.contract_metadata
@@ -139,7 +143,8 @@ GoldRushDecoder.on(
139143
await covalent_client.NftService.getNftMetadataForGivenTokenIdForContract(
140144
chain_name,
141145
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(),
143148
{
144149
withUncached: true,
145150
}
@@ -148,24 +153,21 @@ GoldRushDecoder.on(
148153
heading: `Matched to ${decoded.buy.trader}`,
149154
collection_address: data?.items?.[0]?.contract_address,
150155
collection_name:
151-
data?.items?.[0]?.nft_data?.external_data?.name ||
152-
null,
156+
data?.items?.[0]?.nft_data?.external_data?.name || null,
153157
token_identifier:
154-
data?.items?.[0]?.nft_data?.token_id?.toString() ||
155-
null,
158+
data?.items?.[0]?.nft_data?.token_id?.toString() || null,
156159
images: {
157160
"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,
160163
"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,
163166
"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,
166169
default:
167-
data?.items?.[0]?.nft_data?.external_data
168-
?.image || null,
170+
data?.items?.[0]?.nft_data?.external_data?.image || null,
169171
},
170172
});
171173

0 commit comments

Comments
 (0)