From 4a5c4c2387841d6923fdbed8a7980110c3487cec Mon Sep 17 00:00:00 2001 From: Interchained Date: Mon, 4 Jan 2021 15:38:56 -0500 Subject: [PATCH] enable addressBase58Prefix in config --- lib/utils.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/utils.js b/lib/utils.js index 73f9999..a6c9b35 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -24,8 +24,7 @@ exports.instanceId = function () { /** * Validate miner address **/ -let addressBase58Prefix = parseInt(cnUtil.address_decode(Buffer.from(config.poolServer.poolAddress)) - .toString()); +let addressBase58Prefix = config.poolServer.pubAddressPrefix ? parseInt(config.poolServer.pubAddressPrefix) : parseInt(cnUtil.address_decode(Buffer.from(config.poolServer.poolAddress)).toString()); let integratedAddressBase58Prefix = config.poolServer.intAddressPrefix ? parseInt(config.poolServer.intAddressPrefix) : addressBase58Prefix + 1; let subAddressBase58Prefix = config.poolServer.subAddressPrefix ? parseInt(config.poolServer.subAddressPrefix) : "N/A";