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]]
to := result.accountList[instruction.Accounts[1]]
if offset[1] == 0 {
tx.SolTransfer = append(tx.SolTransfer, SolTransfer{
From: from,
To: to,
Amount: decimal.NewFromInt(int64(lamports)), // solana decimals
})
if result.Meta.Err == nil {
if offset[1] == 0 {
tx.SolTransfer = append(tx.SolTransfer, SolTransfer{
From: from,
To: to,
Amount: decimal.NewFromInt(int64(lamports)), // solana decimals
})
}
}
// load platform by to address
platform, ok := platformFeeAddresses[to]