diff --git a/Cargo.lock b/Cargo.lock index ef5f22e..fb55ba2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1969,7 +1969,7 @@ checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" [[package]] name = "drift-idl-gen" version = "0.2.0" -source = "git+https://github.com/drift-labs/drift-rs.git?rev=726a2e#726a2e7a7b6fe7d62fe0e6e24e3360b5cb5c2e00" +source = "git+https://github.com/drift-labs/drift-rs.git?rev=98619f0#98619f02050610928d3b8b2b46bbc8ae336677a7" dependencies = [ "proc-macro2", "quote", @@ -1982,7 +1982,7 @@ dependencies = [ [[package]] name = "drift-pubsub-client" version = "0.1.1" -source = "git+https://github.com/drift-labs/drift-rs.git?rev=726a2e#726a2e7a7b6fe7d62fe0e6e24e3360b5cb5c2e00" +source = "git+https://github.com/drift-labs/drift-rs.git?rev=98619f0#98619f02050610928d3b8b2b46bbc8ae336677a7" dependencies = [ "futures-util", "gjson", @@ -2002,7 +2002,7 @@ dependencies = [ [[package]] name = "drift-rs" version = "1.0.0-alpha.16" -source = "git+https://github.com/drift-labs/drift-rs.git?rev=726a2e#726a2e7a7b6fe7d62fe0e6e24e3360b5cb5c2e00" +source = "git+https://github.com/drift-labs/drift-rs.git?rev=98619f0#98619f02050610928d3b8b2b46bbc8ae336677a7" dependencies = [ "abi_stable", "ahash 0.8.12", diff --git a/Cargo.toml b/Cargo.toml index 9914a0d..7beca7e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ bincode = "1" clap = { version = "4.0", features = ["derive"] } dashmap = "6.1.0" dotenv = "0.15.0" -drift-rs = { git = "https://github.com/drift-labs/drift-rs.git", rev = "726a2e" } +drift-rs = { git = "https://github.com/drift-labs/drift-rs.git", rev = "98619f0" } ed25519-dalek = "1.0.1" env_logger = "0.11" faster-hex = "0.10.0" diff --git a/src/swift_server.rs b/src/swift_server.rs index ad635de..740169b 100644 --- a/src/swift_server.rs +++ b/src/swift_server.rs @@ -1193,15 +1193,24 @@ impl ServerParams { taker_order_params.market_index, ); } - let message = tx.place_orders(vec![*taker_order_params]).build(); + + // always set fee payer to some other account with SOL + // supports privey wallets and how a swift order is intended to be placed anyway + let message = tx + .place_orders(vec![*taker_order_params]) + .fee_payer(solana_sdk::pubkey!( + "Eiv8eZUWaEPMne8XjA6afzVJ2tJs1BJJ4a1MpZacMSRA" + )) + .build(); let simulate_result_with_timeout = tokio::time::timeout( self.config.simulation_timeout, self.drift.rpc().simulate_transaction_with_config( &VersionedTransaction { message, - // must provide a signature for the RPC call to work - signatures: vec![Signature::new_unique()], + // must provide placerholder signature(s) for the RPC call to work + // signer + fee payer + signatures: vec![Signature::new_unique(), Signature::new_unique()], }, RpcSimulateTransactionConfig { sig_verify: false,