We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ff1240 commit 2d4e30bCopy full SHA for 2d4e30b
sdk/src/driftClient.ts
@@ -6639,14 +6639,21 @@ export class DriftClient {
6639
readablePerpMarketIndex: marketIndex,
6640
});
6641
6642
- const isDelegateSigner = takerInfo.signingAuthority.equals(
6643
- takerInfo.takerUserAccount.delegate
6644
- );
6645
-
6646
const borshBuf = Buffer.from(
6647
signedSignedMsgOrderParams.orderParams.toString(),
6648
'hex'
6649
);
+
+ const isDelegateSigner = borshBuf
+ .slice(0, 8)
+ .equals(
6650
+ Uint8Array.from(
6651
+ Buffer.from(
6652
+ sha256('global' + ':' + 'SignedMsgOrderParamsDelegateMessage')
6653
+ ).slice(0, 8)
6654
+ )
6655
+ );
6656
6657
try {
6658
const { signedMsgOrderParams } = this.decodeSignedMsgOrderParamsMessage(
6659
borshBuf,
0 commit comments