diff --git a/src/lib/lisk/lisk-constants.ts b/src/lib/lisk/lisk-constants.ts index 80c31154d..6e9495e85 100644 --- a/src/lib/lisk/lisk-constants.ts +++ b/src/lib/lisk/lisk-constants.ts @@ -10,8 +10,8 @@ export const LiskHashSettings = { export const LSK_CHAIN_ID = '00000000' export const LSK_TOKEN_ID = '0000000000000000' export const LSK_DECIMALS = CryptosInfo.LSK.decimals -export const LSK_MIN_REQUIRED_FEE = BigInt(164000) // in beddows -export const LSK_COMMAND_FEE = BigInt(5000000) // additional fee when sending to new accounts (@see https://lisk.com/documentation/understand-blockchain/blocks-txs.html#command-fee) +export const LSK_MIN_REQUIRED_FEE = BigInt(CryptosInfo.LSK.defaultFee * 10 ** LSK_DECIMALS) // in beddows +export const LSK_TRANSFER_TO_NEW_ACCOUNT_FEE = BigInt(5000000) // additional fee when sending to new accounts (@see https://lisk.com/documentation/understand-blockchain/blocks-txs.html#command-fee) export const LSK_TXS_PER_PAGE = 25 // transactions per page // Used for estimating fee diff --git a/src/lib/lisk/lisk-utils.ts b/src/lib/lisk/lisk-utils.ts index 596b4a817..728958531 100644 --- a/src/lib/lisk/lisk-utils.ts +++ b/src/lib/lisk/lisk-utils.ts @@ -16,7 +16,7 @@ import sodium from 'sodium-browserify-tweetnacl' import { LiskHashSettings, LSK_CHAIN_ID, - LSK_COMMAND_FEE, + LSK_TRANSFER_TO_NEW_ACCOUNT_FEE, LSK_DECIMALS, LSK_DEMO_ACCOUNT, LSK_MIN_REQUIRED_FEE, @@ -259,9 +259,9 @@ export function estimateFee(params?: EstimateFeeParams) { const minFee = computeMinFee(signedTransaction, TRANSACTION_PARAMS_SCHEMA) const fee = minFee < LSK_MIN_REQUIRED_FEE ? LSK_MIN_REQUIRED_FEE : minFee - const commandFee = isNewAccount ? LSK_COMMAND_FEE : BigInt(0) + const transferToNewAccountFee = isNewAccount ? LSK_TRANSFER_TO_NEW_ACCOUNT_FEE : BigInt(0) - const totalFee = fee + commandFee + const totalFee = fee + transferToNewAccountFee return convertBeddowsToLSK(totalFee.toString()) }