@gooddollar/goodprotocol 1.0.0-beta.52 → 1.0.0-beta.53
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/package.json
CHANGED
|
@@ -376,7 +376,8 @@ export const airdrop = (
|
|
|
376
376
|
`${uAddress}.isNotContract`,
|
|
377
377
|
(await gdMainnet.provider.getCode(uAddress).catch(e => "0x")) === "0x"
|
|
378
378
|
);
|
|
379
|
-
const newBalance =
|
|
379
|
+
const newBalance =
|
|
380
|
+
(get(addresses, `${uAddress}.balance`, 0) as number) + gdShare;
|
|
380
381
|
console.log("uniswap position:", {
|
|
381
382
|
pos,
|
|
382
383
|
newBalance,
|
|
@@ -443,7 +444,7 @@ export const airdrop = (
|
|
|
443
444
|
});
|
|
444
445
|
|
|
445
446
|
const newBalance =
|
|
446
|
-
get(addresses, `${uAddress}.balance`, 0) + gdShare;
|
|
447
|
+
(get(addresses, `${uAddress}.balance`, 0) as number) + gdShare;
|
|
447
448
|
|
|
448
449
|
addresses[uAddress] = updateBalance(addresses[uAddress], {
|
|
449
450
|
balance: newBalance
|
|
@@ -535,7 +536,7 @@ export const airdrop = (
|
|
|
535
536
|
const repShare = parseInt((share * yieldFarmingRep).toFixed(0));
|
|
536
537
|
farmers[uAddress] = [share, repShare];
|
|
537
538
|
const newBalance =
|
|
538
|
-
get(addresses, `${uAddress}.balance`, 0) +
|
|
539
|
+
(get(addresses, `${uAddress}.balance`, 0) as number) +
|
|
539
540
|
share * yieldFarmingRep;
|
|
540
541
|
|
|
541
542
|
addresses[uAddress] = updateBalance(addresses[uAddress], {
|
|
@@ -857,7 +858,7 @@ export const airdrop = (
|
|
|
857
858
|
// Print out all the values:
|
|
858
859
|
logs.map(log => {
|
|
859
860
|
const uAddress = log.args.from.toLowerCase();
|
|
860
|
-
const claims = get(balances, `${uAddress}.claims`, 0) + 1;
|
|
861
|
+
const claims = (get(balances, `${uAddress}.claims`, 0) as number) + 1;
|
|
861
862
|
balances[uAddress] = updateBalance(balances[uAddress], {
|
|
862
863
|
claims
|
|
863
864
|
});
|