ton-watcher
Advanced tools
Comparing version 1.1.11 to 1.1.12
@@ -85,6 +85,6 @@ "use strict"; | ||
} | ||
const amount_bigint = parseToBigInt(amount); | ||
const amount_bigint = parseToBigInt(Number(amount) * 10 ** 9); | ||
if (amount_bigint == null) { | ||
const event = { | ||
data: { error: 'Amount is invalid', req_id }, | ||
data: { error: `Amount is invalid ${Number(amount) * 10 ** 9}`, req_id }, | ||
event: "resSendTon" | ||
@@ -95,3 +95,3 @@ }; | ||
} | ||
const transfer = await ton.transferTonMessage(destination, amount_bigint * BigInt(10 ** 9), message); | ||
const transfer = await ton.transferTonMessage(destination, amount_bigint, message); | ||
try { | ||
@@ -142,6 +142,6 @@ const res = await ton.sendTx(transfer.message); | ||
} | ||
const amount_bigint = parseToBigInt(amount); | ||
const amount_bigint = parseToBigInt(Number(amount) * 10 ** jetton_settings.decimals); | ||
if (amount_bigint == null) { | ||
const event = { | ||
data: { error: 'Amount is invalid', req_id }, | ||
data: { error: `Amount is invalid ${Number(amount) * 10 ** jetton_settings.decimals}`, req_id }, | ||
event: "resSendJetton" | ||
@@ -152,3 +152,3 @@ }; | ||
} | ||
const transfer = await ton.transferJettonMessage(destination, jetton_settings.jettonMasterAddress.toString(), amount_bigint * BigInt(10 ** jetton_settings.decimals), message); | ||
const transfer = await ton.transferJettonMessage(destination, jetton_settings.jettonMasterAddress.toString(), amount_bigint, message); | ||
try { | ||
@@ -155,0 +155,0 @@ const res = await ton.sendTx(transfer.message); |
{ | ||
"name": "ton-watcher", | ||
"version": "1.1.11", | ||
"version": "1.1.12", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -121,7 +121,7 @@ import { getHttpV4Endpoint } from "@orbs-network/ton-access"; | ||
const amount_bigint = parseToBigInt(amount) | ||
const amount_bigint = parseToBigInt(Number(amount) * 10 ** 9) | ||
if (amount_bigint == null) { | ||
const event: TonProcessEvents<'resSendTon'> = { | ||
data: { error: 'Amount is invalid', req_id }, | ||
data: { error: `Amount is invalid ${Number(amount) * 10 ** 9}`, req_id }, | ||
event: "resSendTon" | ||
@@ -133,3 +133,3 @@ }; | ||
const transfer = await ton.transferTonMessage(destination, amount_bigint * BigInt(10 ** 9), message); | ||
const transfer = await ton.transferTonMessage(destination, amount_bigint, message); | ||
try { | ||
@@ -183,7 +183,7 @@ const res = await ton.sendTx(transfer.message); | ||
const amount_bigint = parseToBigInt(amount) | ||
const amount_bigint = parseToBigInt(Number(amount) * 10 ** jetton_settings.decimals) | ||
if (amount_bigint == null) { | ||
const event: TonProcessEvents<'resSendJetton'> = { | ||
data: { error: 'Amount is invalid', req_id }, | ||
data: { error: `Amount is invalid ${Number(amount) * 10 ** jetton_settings.decimals}`, req_id }, | ||
event: "resSendJetton" | ||
@@ -195,3 +195,3 @@ }; | ||
const transfer = await ton.transferJettonMessage(destination, jetton_settings.jettonMasterAddress.toString(), amount_bigint * BigInt(10 ** jetton_settings.decimals), message); | ||
const transfer = await ton.transferJettonMessage(destination, jetton_settings.jettonMasterAddress.toString(), amount_bigint, message); | ||
try { | ||
@@ -198,0 +198,0 @@ const res = await ton.sendTx(transfer.message); |
Sorry, the diff of this file is not supported yet
298070