Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@gearbox-protocol/airdrop

Package Overview
Dependencies
Maintainers
7
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gearbox-protocol/airdrop - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

4

dist/csv/csvExport.d.ts

@@ -5,2 +5,6 @@ export declare class CSVExport {

protected claimed: Record<string, number>;
redirectRewards(from: string, to: string): void;
sumRows(rowA: Record<string, number>, rowB: Record<string, number>): {
[x: string]: number;
};
additem(address: string, column: string, value: number): void;

@@ -7,0 +11,0 @@ addClaimed(address: string, amount: number): void;

@@ -8,2 +8,25 @@ "use strict";

claimed = {};
redirectRewards(from, to) {
const fromLC = from.toLowerCase();
const toLC = to.toLowerCase();
const fromData = this.data[fromLC];
if (fromData) {
const toData = this.data[toLC] || {};
this.data[toLC] = this.sumRows(fromData, toData);
delete this.data[fromLC];
}
const fromClaimed = this.claimed[fromLC];
if (fromClaimed) {
const toClaimed = this.claimed[toLC] || 0;
this.claimed[toLC] = fromClaimed + toClaimed;
delete this.claimed[fromLC];
}
}
sumRows(rowA, rowB) {
const commonSum = Object.fromEntries(Object.entries(rowA).map(([key, value]) => [
key,
(rowB[key] || 0) + value,
]));
return { ...rowA, ...rowB, ...commonSum };
}
additem(address, column, value) {

@@ -10,0 +33,0 @@ const columnLC = column.toLowerCase();

2

package.json
{
"name": "@gearbox-protocol/airdrop",
"description": "Airdrop center for Gearbox protocol",
"version": "1.4.1",
"version": "1.4.2",
"homepage": "https://gearbox.fi",

@@ -6,0 +6,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc