mirror of
https://github.com/pezkuwichain/pezkuwi-telegram-miniapp.git
synced 2026-11-26 20:39:59 +00:00
The TON check walked every jetton transfer in the deposit address's event feed, including the ones it sends. An outgoing transfer whose comment matched a user's deposit code would have been credited to that user; the 2026-02-13 sweep of 41.9 USDT was reported as an unknown-memo deposit on every run. Resolve the configured address to its raw form and skip any transfer whose recipient is not the deposit address.
14 lines
449 B
TypeScript
14 lines
449 B
TypeScript
// A deposit address's event feed also carries the transfers it sends, such as
|
|
// sweeps to the hot wallet. Only a transfer whose recipient is the deposit
|
|
// address itself is a deposit.
|
|
export interface TonJettonTransfer {
|
|
recipient?: { address?: string };
|
|
}
|
|
|
|
export function isIncomingTonTransfer(
|
|
transfer: TonJettonTransfer | undefined,
|
|
depositRawAddress: string
|
|
): boolean {
|
|
return transfer?.recipient?.address === depositRawAddress;
|
|
}
|