MixinNetwork/bot-api-nodejs-client

Minor errors

Closed this issue · 0 comments

In nft example, the payment asset id is MixinAssetID

The MixinAssetID is defined in https://github.com/MixinNetwork/bot-api-nodejs-client/blob/main/src/constant.ts and is XIN asset id. Should it be NFP(/NFO) asset id?

Also, MixinAssetID was used in https://github.com/MixinNetwork/bot-api-nodejs-client/blob/main/src/mvm/utils.ts#L75

export const parseValueForBridge = (assetId: string, amount: string) => {
  if (assetId === MixinAssetID) {
    return ethers.utils.parseEther(Number(amount).toFixed(8));
  }
  return Math.round(ethers.utils.parseUnits(amount, 8).toNumber());
};

It should be ETH asset id for now.