Skip to content

Commit

Permalink
work on deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
jklepatch committed May 1, 2021
1 parent 47091a0 commit 662db5a
Show file tree
Hide file tree
Showing 12 changed files with 47,903 additions and 13 deletions.
1 change: 1 addition & 0 deletions token/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
airdrop.csv
airdrop.numbers
2 changes: 1 addition & 1 deletion token/airdrop/pages/api/authorization.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default async (req, res) => {
}
);
const recipient = await Recipient
.findOne({ address: req.body.address })
.findOne({ address: req.body.address && req.body.address.toLowerCase() })
.exec();
//2. if record found, return signature
if(recipient) {
Expand Down
15 changes: 8 additions & 7 deletions token/airdrop/scripts/fill-allocation.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ const init = async () => {
.pipe(parse({
}));
for await (const allocation of airdrop) {
allocations.push({
address: allocation[1],
basicAllocation: allocation[5],
bonusAllocation: allocation[6],
totalAllocation: allocation[7],
});
if(allocation[1] && allocation[1].trim().length === 42) {
allocations.push({
address: allocation[1].trim().toLowerCase(),
basicAllocation: allocation[5],
bonusAllocation: allocation[6],
totalAllocation: allocation[7],
});
}
}
allocations.shift();
await Recipient.insertMany(allocations)
console.log(`Inserted ${allocations.length} records`);
}
Expand Down
13,410 changes: 13,410 additions & 0 deletions token/build-truffle/Airdrop.json

Large diffs are not rendered by default.

Loading

0 comments on commit 662db5a

Please sign in to comment.