fix errTx do not updte sol transfer

This commit is contained in:
thloyi
2026-02-27 17:41:58 +08:00
parent 3d447ef2e8
commit 920c5ba25b

View File

@@ -34,12 +34,14 @@ func TransferParser(result *RawTx, instruction Instruction, offset [2]uint, tx *
from := result.accountList[result.Transaction.Message.Instructions[offset[0]].Accounts[0]] from := result.accountList[result.Transaction.Message.Instructions[offset[0]].Accounts[0]]
to := result.accountList[instruction.Accounts[1]] to := result.accountList[instruction.Accounts[1]]
if offset[1] == 0 { if result.Meta.Err == nil {
tx.SolTransfer = append(tx.SolTransfer, SolTransfer{ if offset[1] == 0 {
From: from, tx.SolTransfer = append(tx.SolTransfer, SolTransfer{
To: to, From: from,
Amount: decimal.NewFromInt(int64(lamports)), // solana decimals To: to,
}) Amount: decimal.NewFromInt(int64(lamports)), // solana decimals
})
}
} }
// load platform by to address // load platform by to address
platform, ok := platformFeeAddresses[to] platform, ok := platformFeeAddresses[to]