New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bs-neo3

Package Overview
Dependencies
Maintainers
0
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bs-neo3 - npm Package Compare versions

Comparing version 0.32.0 to 0.33.0

10

dist/FlamingoSwapNeonDappKitInvocationBuilder.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc