Comparing version 0.32.0 to 0.33.0
@@ -44,8 +44,5 @@ "use strict"; | ||
const scriptHashes = constants_1.SWAP_SCRIPT_HASHES_BY_NETWORK_TYPE[network.type]; | ||
// Dar override do tokenToReceive com o FlamingoSwapHelper.overrideToken | ||
const tokenToReceiveOverrode = FlamingoSwapHelper_1.FlamingoSwapHelper.overrideToken(network, tokenToReceive); | ||
const amountToReceiveFormatted = neon_core_1.u.BigInteger.fromDecimal(Number(amountToReceive), tokenToReceive.decimals).toString(); | ||
const maximumSellingFormatted = neon_core_1.u.BigInteger.fromDecimal(Number(maximumSelling), tokenToUse.decimals).toString(); | ||
// Eu acho que ta invertido aqui, não deveria ser tokenToReceiveScriptHash ? | ||
const isNeoSwapped = tokenToReceiveOverrode.hash === scriptHashes.neo; | ||
const isNeoSwapped = tokenToReceive.hash === scriptHashes.neo; | ||
if (isNeoSwapped) { | ||
@@ -61,2 +58,3 @@ const transferContractInvocation = this.transferContractInvocation({ | ||
} | ||
const tokenToReceiveOverrode = FlamingoSwapHelper_1.FlamingoSwapHelper.overrideToken(network, tokenToReceive); | ||
invocations.push({ | ||
@@ -113,4 +111,2 @@ scriptHash: scriptHashes.flamingoSwapRouter, | ||
const scriptHashes = constants_1.SWAP_SCRIPT_HASHES_BY_NETWORK_TYPE[network.type]; | ||
// Provavelmente invertido tambem | ||
const isNeoSwapped = tokenToUse.hash === scriptHashes.neo; | ||
const amountToUseFormatted = neon_core_1.u.BigInteger.fromDecimal(Number(amountToUse), tokenToUse.decimals).toString(); | ||
@@ -154,4 +150,4 @@ const minimumReceivedFormatted = neon_core_1.u.BigInteger.fromDecimal(Number(minimumReceived), tokenToReceive.decimals).toString(); | ||
allowedContracts.push(...this.allowedContractsSwap(scriptHashes, tokenToReceive.hash, tokenToUse.hash)); | ||
const isNeoSwapped = tokenToUse.hash === scriptHashes.neo; | ||
if (isNeoSwapped) { | ||
// Coloca isso aqui numa constante em MAIUSCULA | ||
const GAS_PER_NEO = 0.001; | ||
@@ -158,0 +154,0 @@ const amountToUseInTransferFormatted = neon_core_1.u.BigInteger.fromNumber(Number(amountToUse) * GAS_PER_NEO).toString(); |
{ | ||
"name": "bs-neo3", | ||
"version": "0.32.0", | ||
"version": "0.33.0", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
96977
1980