Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ton-watcher

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

ton-watcher - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

28

build/modules/wallet/CoreV4.js

@@ -138,8 +138,8 @@ "use strict";

}
const res = await this.ton_client.getLastBlock();
const sq = res.last.seqno;
const is_deploed = true || (await this.ton_client.isContractDeployed(sq, parsed_address));
if (!is_deploed) {
throw new Error('Address is not active');
}
// const res = await this.ton_client.getLastBlock();
// const sq = res.last.seqno;
// const is_deploed = true || (await this.ton_client.isContractDeployed(sq, parsed_address as Address));
// if (!is_deploed) {
// throw new Error('Address is not active');
// }
const jetton_info = await this.getJettonInfo(parsed_jetton_master_address.toString({ testOnly: this.is_testnet }));

@@ -153,10 +153,10 @@ if (!jetton_info) {

const { jettonUserWalletAddress, jettonUserWalletContract } = jetton_info;
// const jetton_balance = await jettonUserWalletContract.getBalance();
// if (jetton_balance < amount) {
// return Promise.reject(`Balance less than amount to transfer balance is ${jetton_balance} amount is ${amount}`);
// }
// const ton_balance = await this.contract.getBalance();
// if (ton_balance < BigInt(10 ** 8)) {
// return Promise.reject(`Ton Balance less than fee to balance is ${ton_balance} min balance is 0.1 TON`);
// }
const jetton_balance = await jettonUserWalletContract.getBalance();
if (jetton_balance < amount) {
return Promise.reject(`Balance less than amount to transfer balance is ${jetton_balance} amount is ${amount}`);
}
const ton_balance = await this.contract.getBalance();
if (ton_balance < BigInt(10 ** 8)) {
return Promise.reject(`Ton Balance less than fee to balance is ${ton_balance} min balance is 0.1 TON`);
}
const seqno = await this.contract.getSeqno();

@@ -163,0 +163,0 @@ const forwardPayload = (0, ton_1.beginCell)()

{
"name": "ton-watcher",
"version": "1.4.0",
"version": "1.4.1",
"description": "",

@@ -5,0 +5,0 @@ "main": "build/index.js",

@@ -167,9 +167,9 @@ import { TonClient4, WalletContractV5R1, internal, SendMode, OpenedContract, Address, JettonMaster, JettonWallet, beginCell, toNano, external, Cell, storeMessage } from "@ton/ton";

const res = await this.ton_client.getLastBlock();
const sq = res.last.seqno;
const is_deploed = true || (await this.ton_client.isContractDeployed(sq, parsed_address as Address));
// const res = await this.ton_client.getLastBlock();
// const sq = res.last.seqno;
// const is_deploed = true || (await this.ton_client.isContractDeployed(sq, parsed_address as Address));
if (!is_deploed) {
throw new Error('Address is not active');
}
// if (!is_deploed) {
// throw new Error('Address is not active');
// }

@@ -188,13 +188,13 @@ const jetton_info = await this.getJettonInfo(parsed_jetton_master_address.toString({ testOnly: this.is_testnet }));

// const jetton_balance = await jettonUserWalletContract.getBalance();
const jetton_balance = await jettonUserWalletContract.getBalance();
// if (jetton_balance < amount) {
// return Promise.reject(`Balance less than amount to transfer balance is ${jetton_balance} amount is ${amount}`);
// }
if (jetton_balance < amount) {
return Promise.reject(`Balance less than amount to transfer balance is ${jetton_balance} amount is ${amount}`);
}
// const ton_balance = await this.contract.getBalance();
const ton_balance = await this.contract.getBalance();
// if (ton_balance < BigInt(10 ** 8)) {
// return Promise.reject(`Ton Balance less than fee to balance is ${ton_balance} min balance is 0.1 TON`);
// }
if (ton_balance < BigInt(10 ** 8)) {
return Promise.reject(`Ton Balance less than fee to balance is ${ton_balance} min balance is 0.1 TON`);
}

@@ -201,0 +201,0 @@ const seqno = await this.contract.getSeqno();

Sorry, the diff of this file is not supported yet

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