1
This commit is contained in:
parent
fb6218418c
commit
b6847d6b20
@ -49,6 +49,7 @@ function getItemMetaNftType(itemMeta) {
|
||||
function getNftTableName(tokenType) {
|
||||
switch (Number(tokenType)) {
|
||||
case bcconst.BC_NFT_HERO:
|
||||
case bcconst.BC_NFT_NORMAL_HERO:
|
||||
{
|
||||
return 't_hero';
|
||||
}
|
||||
|
@ -114,7 +114,11 @@ async function verify(session) {
|
||||
console.log('fffff', err, decoded);
|
||||
if (err != null) {
|
||||
//console.log(postData);
|
||||
session.rspErr(500, err);
|
||||
if (err instanceof jwt.TokenExpiredError) {
|
||||
session.rspErr(501, 'jwt expired');
|
||||
} else {
|
||||
session.rspErr(500, err);
|
||||
}
|
||||
return;
|
||||
}
|
||||
session.rspData({
|
||||
|
@ -46,7 +46,8 @@ async function mintHero(session) {
|
||||
session.rspErr(101, 'nft_address param error2');
|
||||
return;
|
||||
}
|
||||
if (!(toAddress == heroAddress || toAddress == normalHeroAddress)) {
|
||||
console.log(toAddress, heroAddress, normalHeroAddress);
|
||||
if (!(nftAddress == heroAddress || nftAddress == normalHeroAddress)) {
|
||||
session.rspErr(500, 'nft_address is not hero or normalhero address');
|
||||
return;
|
||||
}
|
||||
@ -76,7 +77,7 @@ async function mintHero(session) {
|
||||
]);
|
||||
const nonce = transId;
|
||||
const nftList = [];
|
||||
tokenids.forEach(ele => {
|
||||
tokenIds.forEach(ele => {
|
||||
nftList.push([
|
||||
ele,
|
||||
toAddress,
|
||||
|
@ -76,7 +76,7 @@ async function nftUnlock(session) {
|
||||
]);
|
||||
const nonce = transId;
|
||||
const nftList = [];
|
||||
tokenids.forEach(ele => {
|
||||
tokenIds.forEach(ele => {
|
||||
nftList.push([
|
||||
ele,
|
||||
toAddress,
|
||||
|
Loading…
x
Reference in New Issue
Block a user