1
This commit is contained in:
parent
0d41dfecfc
commit
1cc504a2d1
@ -159,6 +159,14 @@ async function init() {
|
|||||||
console.log('load AirDrop: ' + item);
|
console.log('load AirDrop: ' + item);
|
||||||
const jsonData = utils.readJsonFromFile
|
const jsonData = utils.readJsonFromFile
|
||||||
(configDir + `airdrops/${airDropDate}.airdrop.json`);
|
(configDir + `airdrops/${airDropDate}.airdrop.json`);
|
||||||
|
jsonData.forEach(
|
||||||
|
(airDropMeta) => {
|
||||||
|
if (utils.hasKey(airDropTokenIdHash, airDropMeta['token_id'])) {
|
||||||
|
throw new Error('airdrop token_id error');
|
||||||
|
}
|
||||||
|
airDropTokenIdHash[airDropMeta['token_id']] = airDropMeta;
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -253,7 +261,7 @@ function getAllTables() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getAirDrop(tokenId, netId, tokenType, contractAddress) {
|
function getAirDrop(tokenId, netId, tokenType, contractAddress) {
|
||||||
const airDropMeta = callMetaStatic('AirDrop', 'getAirDropByTokenId', tokenId);
|
const airDropMeta = utils.hasKey(airDropTokenIdHash, tokenId) ? airDropTokenIdHash[tokenId] : null;
|
||||||
return airDropMeta;
|
return airDropMeta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user