@defisaver/positions-sdk 2.1.23-dev-sena → 2.1.23-dev-sena-2
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.
package/cjs/claiming/ethena.js
CHANGED
|
@@ -39,7 +39,6 @@ exports.fetchEthenaAirdropReward = fetchEthenaAirdropReward;
|
|
|
39
39
|
const fetchEthenaAirdropRewards = (walletAddresses) => __awaiter(void 0, void 0, void 0, function* () {
|
|
40
40
|
const apiDataPromises = walletAddresses.map(address => (0, exports.fetchEthenaAirdropReward)(address));
|
|
41
41
|
const apiDataArray = yield Promise.all(apiDataPromises);
|
|
42
|
-
console.log(apiDataArray);
|
|
43
42
|
const results = {};
|
|
44
43
|
for (let i = 0; i < walletAddresses.length; i++) {
|
|
45
44
|
const walletAddress = walletAddresses[i];
|
|
@@ -47,13 +46,8 @@ const fetchEthenaAirdropRewards = (walletAddresses) => __awaiter(void 0, void 0,
|
|
|
47
46
|
if (!data || data.claimed) {
|
|
48
47
|
continue;
|
|
49
48
|
}
|
|
50
|
-
if (data.length === 0) {
|
|
51
|
-
results[walletAddress.toLowerCase()] = [];
|
|
52
|
-
continue;
|
|
53
|
-
}
|
|
54
49
|
const processedRewards = [];
|
|
55
50
|
const assetInfo = (0, tokens_1.getAssetInfo)('sENA');
|
|
56
|
-
console.log(assetInfo);
|
|
57
51
|
const amount = (0, utils_1.getEthAmountForDecimals)(data.events[0].awardAmount, assetInfo.decimals);
|
|
58
52
|
if (new decimal_js_1.default(amount).gt('0')) {
|
|
59
53
|
processedRewards.push({
|
package/esm/claiming/ethena.js
CHANGED
|
@@ -32,7 +32,6 @@ export const fetchEthenaAirdropReward = (address) => __awaiter(void 0, void 0, v
|
|
|
32
32
|
export const fetchEthenaAirdropRewards = (walletAddresses) => __awaiter(void 0, void 0, void 0, function* () {
|
|
33
33
|
const apiDataPromises = walletAddresses.map(address => fetchEthenaAirdropReward(address));
|
|
34
34
|
const apiDataArray = yield Promise.all(apiDataPromises);
|
|
35
|
-
console.log(apiDataArray);
|
|
36
35
|
const results = {};
|
|
37
36
|
for (let i = 0; i < walletAddresses.length; i++) {
|
|
38
37
|
const walletAddress = walletAddresses[i];
|
|
@@ -40,13 +39,8 @@ export const fetchEthenaAirdropRewards = (walletAddresses) => __awaiter(void 0,
|
|
|
40
39
|
if (!data || data.claimed) {
|
|
41
40
|
continue;
|
|
42
41
|
}
|
|
43
|
-
if (data.length === 0) {
|
|
44
|
-
results[walletAddress.toLowerCase()] = [];
|
|
45
|
-
continue;
|
|
46
|
-
}
|
|
47
42
|
const processedRewards = [];
|
|
48
43
|
const assetInfo = getAssetInfo('sENA');
|
|
49
|
-
console.log(assetInfo);
|
|
50
44
|
const amount = getEthAmountForDecimals(data.events[0].awardAmount, assetInfo.decimals);
|
|
51
45
|
if (new Dec(amount).gt('0')) {
|
|
52
46
|
processedRewards.push({
|
package/package.json
CHANGED
package/src/claiming/ethena.ts
CHANGED
|
@@ -28,7 +28,6 @@ export const fetchEthenaAirdropRewards = async (walletAddresses: EthAddress[]):
|
|
|
28
28
|
const apiDataPromises = walletAddresses.map(address => fetchEthenaAirdropReward(address));
|
|
29
29
|
const apiDataArray = await Promise.all(apiDataPromises);
|
|
30
30
|
|
|
31
|
-
console.log(apiDataArray);
|
|
32
31
|
const results: Record<string, any[]> = {};
|
|
33
32
|
for (let i = 0; i < walletAddresses.length; i++) {
|
|
34
33
|
const walletAddress = walletAddresses[i];
|
|
@@ -38,14 +37,9 @@ export const fetchEthenaAirdropRewards = async (walletAddresses: EthAddress[]):
|
|
|
38
37
|
continue;
|
|
39
38
|
}
|
|
40
39
|
|
|
41
|
-
if (data.length === 0) {
|
|
42
|
-
results[walletAddress.toLowerCase() as EthAddress] = [];
|
|
43
|
-
continue;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
40
|
const processedRewards = [];
|
|
47
41
|
const assetInfo = getAssetInfo('sENA');
|
|
48
|
-
|
|
42
|
+
|
|
49
43
|
const amount = getEthAmountForDecimals(data.events[0].awardAmount, assetInfo.decimals);
|
|
50
44
|
|
|
51
45
|
if (new Dec(amount).gt('0')) {
|