mirror of
https://github.com/0xfnzero/solana-streamer.git
synced 2026-08-17 10:58:06 +00:00
Propagate PumpFun instruction amount fields
This commit is contained in:
@@ -62,6 +62,9 @@ mod tests {
|
||||
t.user = Pubkey::new_unique();
|
||||
t.sol_amount = 100;
|
||||
t.token_amount = 200;
|
||||
t.amount = 200;
|
||||
t.max_sol_cost = 150;
|
||||
t.min_sol_output = 0;
|
||||
t.is_buy = true;
|
||||
|
||||
let ev = convert_parser_event(PbDexEvent::PumpFunTrade(t), None, 999).expect("convert");
|
||||
@@ -71,6 +74,9 @@ mod tests {
|
||||
assert_eq!(st.metadata.recv_us, 999);
|
||||
assert_eq!(st.sol_amount, 100);
|
||||
assert_eq!(st.token_amount, 200);
|
||||
assert_eq!(st.amount, 200);
|
||||
assert_eq!(st.max_sol_cost, 150);
|
||||
assert_eq!(st.min_sol_output, 0);
|
||||
assert!(st.is_buy);
|
||||
}
|
||||
_ => panic!("expected PumpFunTradeEvent"),
|
||||
|
||||
@@ -556,6 +556,9 @@ pub(crate) fn pumpfun_trade_from_parser_with_event_type(
|
||||
cashback_fee_basis_points: t.cashback_fee_basis_points,
|
||||
cashback: t.cashback,
|
||||
is_cashback_coin: t.is_cashback_coin,
|
||||
amount: t.amount,
|
||||
max_sol_cost: t.max_sol_cost,
|
||||
min_sol_output: t.min_sol_output,
|
||||
..Default::default()
|
||||
};
|
||||
DexEvent::PumpFunTradeEvent(st)
|
||||
|
||||
Reference in New Issue
Block a user