Skip to content

Commit 9718680

Browse files
authored
Merge pull request #7501 from BitGo/derek/SC-3956-classify-all-walletconnect-tx-as-custom
feat(sdk-coin-sol): classify all WalletConnect transactions as custom using memo
2 parents 2b259cd + 1f639da commit 9718680

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/sdk-coin-sol/src/lib/utils.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,9 @@ export function getTransactionType(transaction: SolTransaction): TransactionType
329329
// check if deactivate instruction does not exist because deactivate can be include a transfer instruction
330330
const memoInstruction = instructions.find((instruction) => getInstructionType(instruction) === 'Memo');
331331
const memoData = memoInstruction?.data.toString('utf-8');
332+
if (memoData?.includes('WalletConnectDefiCustomTx')) {
333+
return TransactionType.CustomTx;
334+
}
332335
if (instructions.filter((instruction) => getInstructionType(instruction) === 'Deactivate').length === 0) {
333336
for (const instruction of instructions) {
334337
const instructionType = getInstructionType(instruction);

0 commit comments

Comments
 (0)