This commit is contained in:
aozhiwei 2023-07-10 18:57:05 +08:00
parent b51c2e873a
commit ca9e52d321

27
server/common/bchelper.js Normal file
View File

@ -0,0 +1,27 @@
const constant = require("common/constant");
function getNftNameByTokenType(tokenType) {
switch (Number(tokenType)) {
case bcconst.BC_NFT_HERO:
{
return HERO_INSTANCE_NAME;
}
break;
case bcconst.BC_NFT_CHIP:
{
return CHIP_INSTANCE_NAME;
}
break;
case bcconst.BC_NFT_CLAIM_BOX:
{
return Gacha_INSTANCE_NAME;
}
break;
default:
{
return '';
}
}
}
exports.getNftNameByTokenType = getNftNameByTokenType;