impermax-sdk 2.1.411 → 2.1.412
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -87,8 +87,8 @@ class OffchainAPRHelper {
|
|
|
87
87
|
const pool = i.pool_old.split("-")[0];
|
|
88
88
|
// OP is outdated, report to llama
|
|
89
89
|
let llamaChain = i.chain.toLowerCase();
|
|
90
|
-
if (llamaChain
|
|
91
|
-
llamaChain = 'optimism';
|
|
90
|
+
if (llamaChain.includes('op mainnet'))
|
|
91
|
+
llamaChain = llamaChain.replace('op mainnet', 'optimism');
|
|
92
92
|
const llamaId = pool.concat("-", llamaChain).toLowerCase();
|
|
93
93
|
acc[llamaId] = i;
|
|
94
94
|
return acc;
|
|
@@ -124,16 +124,16 @@ class OffchainAPRHelper {
|
|
|
124
124
|
// Get the chain tvls
|
|
125
125
|
this.chainTvls = Object.entries(currentChainTvls).reduce((acc, [chain, tvl]) => {
|
|
126
126
|
let llamaChain = chain.toLowerCase();
|
|
127
|
-
if (llamaChain
|
|
128
|
-
llamaChain = 'optimism';
|
|
127
|
+
if (llamaChain.includes('op mainnet'))
|
|
128
|
+
llamaChain = llamaChain.replace('op mainnet', 'optimism');
|
|
129
129
|
acc[llamaChain.toLowerCase()] = tvl;
|
|
130
130
|
return acc;
|
|
131
131
|
}, {});
|
|
132
132
|
// Get the chain tvls day data to build charts
|
|
133
133
|
this.chainTvlCharts = Object.entries(chainTvlCharts).reduce((acc, [chain, dayData]) => {
|
|
134
134
|
let llamaChain = chain.toLowerCase();
|
|
135
|
-
if (llamaChain
|
|
136
|
-
llamaChain = 'optimism';
|
|
135
|
+
if (llamaChain.includes('op mainnet'))
|
|
136
|
+
llamaChain = llamaChain.replace('op mainnet', 'optimism');
|
|
137
137
|
acc[llamaChain.toLowerCase()] = dayData.tvl;
|
|
138
138
|
return acc;
|
|
139
139
|
}, {});
|
|
@@ -155,8 +155,8 @@ class OffchainAPRHelper {
|
|
|
155
155
|
this.chainsTotalSupplied = impermaxPools.reduce((acc, pool) => {
|
|
156
156
|
// OP is outdated, report to llama
|
|
157
157
|
let chain = pool.chain.toLowerCase();
|
|
158
|
-
if (chain
|
|
159
|
-
chain = 'optimism';
|
|
158
|
+
if (chain.includes('op mainnet'))
|
|
159
|
+
chain = chain.replace('op mainnet', 'optimism');
|
|
160
160
|
acc[chain] = (acc[chain] || 0) + pool.totalSupplyUsd;
|
|
161
161
|
return acc;
|
|
162
162
|
}, {});
|