Skip to content

Commit

Permalink
improve(exclusivity): Route exclusive ETH deposits via SpokePool (#1202)
Browse files Browse the repository at this point in the history
This permits exclusivity to be applied on ETH deposits as well.
  • Loading branch information
pxrl authored Sep 10, 2024
1 parent 23a3387 commit 4f196f0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/views/Bridge/hooks/useBridgeAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
TransferQuoteReceivedProperties,
ampli,
} from "ampli";
import { BigNumber, providers } from "ethers";
import { BigNumber, constants, providers } from "ethers";
import {
useConnection,
useApprove,
Expand Down Expand Up @@ -167,10 +167,13 @@ export function useBridgeAction(
networkMismatchHandler
);
} else {
const isExclusive =
frozenDepositArgs.exclusivityDeadline > 0 &&
frozenDepositArgs.exclusiveRelayer !== constants.AddressZero;
const { spokePool, shouldUseSpokePoolVerifier, spokePoolVerifier } =
await getSpokePoolAndVerifier(frozenRoute);
tx =
shouldUseSpokePoolVerifier && spokePoolVerifier
shouldUseSpokePoolVerifier && !isExclusive && spokePoolVerifier
? await sendSpokePoolVerifierDepositTx(
signer,
frozenDepositArgs,
Expand Down

0 comments on commit 4f196f0

Please sign in to comment.