Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
feat: add SUI support (split out from 794)
  • Loading branch information
nascob committed Oct 14, 2025
commit 44e3bbe8c961a8d8cc386f33d33192a287aa8bcc
13 changes: 7 additions & 6 deletions src/routes/mayan/MayanRouteBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -649,10 +649,11 @@ export class MayanRouteBase<N extends Network> extends routes.AutomaticRoute<
);

if (request.fromChain.chain === 'Solana') {
const solanaOptions = {
allowSwapperOffCurve: true,
usdcPermitSignature,
};
// Uncomment and use this when we want to support HyperCore USDC deposits on SOL
// const solanaOptions = {
// allowSwapperOffCurve: true,
// usdcPermitSignature,
// };

const { instructions, signers, lookupTables } =
await (this.isTestnetRequest(request)
Expand All @@ -662,15 +663,15 @@ export class MayanRouteBase<N extends Network> extends routes.AutomaticRoute<
destinationAddress,
null,
rpc,
solanaOptions,
{ allowSwapperOffCurve: true },
)
: createSwapFromSolanaInstructions(
quote.details!,
originAddress,
destinationAddress,
null,
rpc,
solanaOptions,
{ allowSwapperOffCurve: true },
));

const payerKey = new PublicKey(originAddress);
Expand Down
12 changes: 4 additions & 8 deletions src/utils/hypercore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,14 @@ export function validateHyperCoreTransfer<N extends Network>(
};
}

if (
!(
isEvmChain(fromChain.chain) ||
fromChain.chain === 'Sui' ||
fromChain.chain === 'Solana'
)
) {
if (!(isEvmChain(fromChain.chain) || fromChain.chain === 'Sui')) {
// Uncomment and use this when we want to support HyperCore USDC deposits on SOL
// || fromChain.chain === 'Solana')
return {
valid: false,
params,
error: new routes.UnavailableError(
new Error('HyperCore only supports EVM, Solana or Sui source chains'),
new Error('HyperCore only supports EVM or Sui source chains'),
),
};
}
Expand Down
Loading