Skip to content

Commit

Permalink
Merge pull request #341 from drift-labs/lukas/fix-swift-filler-compile
Browse files Browse the repository at this point in the history
fix: swift filler compile error
  • Loading branch information
LukasDeco authored Jan 10, 2025
2 parents c72859f + 0728b1d commit 8b51f55
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions src/experimental-bots/filler/fillerMultithreaded.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ import { ChildProcess } from 'child_process';
import { PythPriceFeedSubscriber } from 'src/pythPriceFeedSubscriber';
import { PythLazerSubscriber } from '../../pythLazerSubscriber';
import path from 'path';
import { SignedSwiftOrderParams } from '@drift-labs/sdk/lib/node/swift/types';

const logPrefix = '[Filler]';
export type MakerNodeMap = Map<string, DLOBNode[]>;
Expand Down Expand Up @@ -1768,10 +1769,16 @@ export class FillerMultithreaded {
const swiftOrderMessageParams = this.swiftOrderMessages.get(
nodeToFill.node.order!.orderId
);
const signedSwiftOrderParams: SignedSwiftOrderParams = {
orderParams: Buffer.from(swiftOrderMessageParams['order_message']),
signature: Buffer.from(
swiftOrderMessageParams['order_signature'],
'base64'
),
};
ixs.push(
...(await this.driftClient.getPlaceSwiftTakerPerpOrderIxs(
Buffer.from(swiftOrderMessageParams['order_message'], 'base64'),
Buffer.from(swiftOrderMessageParams['order_signature'], 'base64'),
signedSwiftOrderParams,
nodeToFill.node.order!.marketIndex,
{
taker: new PublicKey(takerUserPubKey),
Expand Down Expand Up @@ -2063,10 +2070,16 @@ export class FillerMultithreaded {
const swiftOrderMessageParams = this.swiftOrderMessages.get(
nodeToFill.node.order!.orderId
);
const signedSwiftOrderMessageParams: SignedSwiftOrderParams = {
orderParams: Buffer.from(swiftOrderMessageParams['order_message']),
signature: Buffer.from(
swiftOrderMessageParams['order_signature'],
'base64'
),
};
ixs.push(
...(await this.driftClient.getPlaceSwiftTakerPerpOrderIxs(
Buffer.from(swiftOrderMessageParams['order_message'], 'base64'),
Buffer.from(swiftOrderMessageParams['order_signature'], 'base64'),
signedSwiftOrderMessageParams,
nodeToFill.node.order!.marketIndex,
{
taker: new PublicKey(takerUserPubKey),
Expand Down

0 comments on commit 8b51f55

Please sign in to comment.