Skip to content

Commit

Permalink
Merge pull request #346 from drift-labs/lukas/fix-swift-maker
Browse files Browse the repository at this point in the history
fix: swift maker not sending hex buffer
  • Loading branch information
LukasDeco authored Jan 14, 2025
2 parents e9496be + 5fa9b84 commit 039ad6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/experimental-bots/swift/makerExample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export class SwiftMaker {
const order = JSON.parse(message['order']);
console.info(`received order. uuid: ${order['uuid']}`);

const swiftOrderParamsBufHex = Buffer.from(order['order_message']);
const swiftOrderParamsBuf = Buffer.from(
order['order_message'],
'hex'
Expand Down Expand Up @@ -148,7 +149,7 @@ export class SwiftMaker {

const ixs = await this.driftClient.getPlaceAndMakeSwiftPerpOrderIxs(
{
orderParams: swiftOrderParamsBuf,
orderParams: swiftOrderParamsBufHex,
signature: Buffer.from(order['order_signature'], 'base64'),
},
decodeUTF8(order['uuid']),
Expand Down

0 comments on commit 039ad6e

Please sign in to comment.