Allow the user to toggle on automatic priority fees, which polls getRecentPrioritizationFees() to determine a good fee using a median of the last 20 blocks of fees. Note that we pass in the perpsyncqueue and greeks accounts to the RPC function, as they're the most touched accounts during trading.
We also refactor the existing priority fee logic a bit, removing toggleUsePriorityFees to make things simpler. If you want manual fees, just set Exchange.updatePriorityFee() to be nonzero. If you want automatic fees, just call Exchange.toggleAutoPriorityFee().
Allow the user to toggle on automatic priority fees, which polls getRecentPrioritizationFees() to determine a good fee using a median of the last 20 blocks of fees. Note that we pass in the perpsyncqueue and greeks accounts to the RPC function, as they're the most touched accounts during trading.
We also refactor the existing priority fee logic a bit, removing toggleUsePriorityFees to make things simpler. If you want manual fees, just set Exchange.updatePriorityFee() to be nonzero. If you want automatic fees, just call Exchange.toggleAutoPriorityFee().