Description
I have a piece of code that checks to see if a position is out of range, if so, it closes it. However, I keep getting this error while generating close instructions.
This is the code where the internal call to the collect_rewards_quote function in quote/rewards.rs takes place.
let close_instructions = match close_position_instructions( &rpc, nft_address.clone(), Some(100), None, ).await { Ok(instructions) => instructions, Err(_) => continue, };
this is the error :
thread 'main' panicked at /home/willy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/orca_whirlpools_core-1.0.2/src/quote/rewards.rs:38:27: attempt to subtract with overflow note: run with
RUST_BACKTRACE=1 environment variable to display a backtrace