@clonegod/ttd-sui-common 1.0.68 → 1.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -51,9 +51,6 @@ class SuiTransactionParser {
|
|
|
51
51
|
const balanceChanges = ((_b = tx_receipt.transaction) === null || _b === void 0 ? void 0 : _b.balance_changes) || [];
|
|
52
52
|
(0, dist_1.log_info)('balance_changes', { txid, balance_changes: balanceChanges });
|
|
53
53
|
for (const change of balanceChanges) {
|
|
54
|
-
if (change.address.toLowerCase() !== this.walletAddress.toLowerCase()) {
|
|
55
|
-
continue;
|
|
56
|
-
}
|
|
57
54
|
const amount = new decimal_js_1.default(change.amount);
|
|
58
55
|
const coinType = change.coin_type;
|
|
59
56
|
const normalizedCoinType = (0, index_1.normalizeSuiTokenAddress)(coinType);
|
|
@@ -65,16 +62,6 @@ class SuiTransactionParser {
|
|
|
65
62
|
if (normalizedCoinType === poolTokenBAddress) {
|
|
66
63
|
tokenBChangeAmount = amount.div(Math.pow(10, pool_info.tokenB.decimals));
|
|
67
64
|
}
|
|
68
|
-
console.log('check balance change', {
|
|
69
|
-
change_coin_type: change.coin_type,
|
|
70
|
-
normalizedCoinType,
|
|
71
|
-
pool_token_a: pool_info.tokenA.address,
|
|
72
|
-
poolTokenAAddress,
|
|
73
|
-
pool_token_b: pool_info.tokenB.address,
|
|
74
|
-
poolTokenBAddress,
|
|
75
|
-
tokenAChangeAmount,
|
|
76
|
-
tokenBChangeAmount
|
|
77
|
-
});
|
|
78
65
|
}
|
|
79
66
|
let tx_price = this.calc_tx_price(tokenAChangeAmount, tokenBChangeAmount, pool_info);
|
|
80
67
|
swap_detail = {
|