Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 2 additions & 1 deletion demo/pages/sdk/actions/fastFill.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ const FastFillPage: NextPage = () => {
tronWeb
)
}
// Note: Hyperliquid support can be added here following a similar pattern
// Note: Hyperliquid wallets are EVM-compatible and handled by the isEthereumWallet path above.
// The SDK automatically converts Hyperliquid transaction steps to signature steps (chain ID 1337).

setAdaptedWallet(wallet)
} catch (e: any) {
Expand Down
15 changes: 14 additions & 1 deletion demo/utils/createFastFillWallet.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { AdaptedWallet, Execute, TransactionStepItem } from '@relayprotocol/relay-sdk'
import type { AdaptedWallet, Execute, SignatureStepItem, TransactionStepItem } from '@relayprotocol/relay-sdk'

/**
* Creates a fast-fill wallet adapter that wraps any AdaptedWallet
Expand Down Expand Up @@ -48,6 +48,19 @@ export const createFastFillWallet = (

return {
...originalWallet,
handleSignMessageStep: async (
item: SignatureStepItem,
step: Execute['steps'][0]
) => {
const signature = await originalWallet.handleSignMessageStep(item, step)

// Call fastFill proxy API after Hyperliquid signature deposit
if (step.requestId && step.id === ('hyperliquid-signature' as any)) {
await callFastFillAPI(step.requestId)
}

return signature
},
handleSendTransactionStep: async (
chainId: number,
stepItem: TransactionStepItem,
Expand Down