Calculate fees for simple transactions using NEM blockchain


#1

I am sending a message to an address. According to the doc, if we calculate the fees to send the message than it’s 0.5 XEM but when i transact and show in Nano wallet it shows 1 XEM.

I have used CalculateMessage function from Documentation Link.

I am sending 0x7644415859756e574c7249354168354f725452454d79327674575a78784e394c396d7a4c667a664f754b37574a6476594a665850624450614d51514b6554324f486b53616b736d446979574832394d6734356158314e477658666a685969734649766e367644415859756e574c7249354168354f725452454d79327674575a78784e394c396d7a4c667a664f754b37574a6476594a665850624450614d51514b6554324f486b53616b736d446979574832394d6734356158314e477658666a685969734649766e367644415859756e574c7249354168354f725452454d79327674575a78784e394c396d7a4c667a664f754b37574a6476594a665850624450614d51514b6554324f486b53616b736d446979574832394d6734356158314e477658666a685969734649766e36 string as message with 0 NEM

The transaction consumes 1.00 XEM fees as per the transaction details.

using following function

Please help me to out


#2

0.1 xem for menssage s. 0.05 no menssage


#3

There is a formula to calculate it dynamically :slight_smile:


#4

@pawelm he can solve :wink:


#5

First of all please try don’t ask same question in couple places. And wait a little bit for answer :wink:

As we already answered calculateMessage receive payload after utf8tohex function which doubles it’s size. That’s why inside function is assumption that you receive result of it.

CalculateMessage shouldn’t be called directly. Fee is calculated when you call nem-sdk prepare function.


#6

Yeah, Thanks for the support and satisfactory answer.
At that moment, No one was available in the group that’s the reason for posting the question on forum. And all sudden after posting, the reply came from Telegram channel.
This all are small doubts or minors so rather than to wait i preferred to get answer from expert from community :slight_smile: