Skip to content

Commit

Permalink
improve: use dummy address
Browse files Browse the repository at this point in the history
  • Loading branch information
james-a-morris committed Oct 24, 2023
1 parent bc6c8f7 commit 6821268
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 5 additions & 2 deletions api/_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,15 +477,18 @@ export const getTokenSymbol = (tokenAddress: string): string => {
* @param amount The amount of funds that are requesting to be transferred
* @param originChainId The origin chain that this token will be transferred from
* @param destinationChainId The destination chain that this token will be transferred to
* @param recipientAddress The address that will receive the transferred funds
* @param tokenPrice An optional overred price to prevent the SDK from creating its own call
* @param message An optional message to include in the transfer
* @param relayerAddress An optional relayer address to use for the transfer
* @returns The a promise to the relayer fee for the given `amount` of transferring `l1Token` to `destinationChainId`
*/
export const getRelayerFeeDetails = async (
l1Token: string,
amount: sdk.utils.BigNumberish,
originChainId: number,
destinationChainId: number,
recipientAddress: string,
recipientAddress = "0x893d0d70ad97717052e3aa8903d9615804167759", // A known dummy address
tokenPrice?: number,
message?: string,
relayerAddress?: string
Expand All @@ -505,7 +508,7 @@ export const getRelayerFeeDetails = async (
{
amount: sdk.utils.toBN(amount),
depositId: sdk.utils.bnUint32Max.toNumber(),
depositor: sdk.utils.randomAddress(), // Random depositor - shouldn't make too much of a difference.
depositor: recipientAddress,
destinationChainId,
originChainId,
relayerFeePct: sdk.utils.bnZero,
Expand Down
3 changes: 1 addition & 2 deletions api/limits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import {
HUB_POOL_CHAIN_ID,
ENABLED_ROUTES,
} from "./_utils";
import { utils } from "@across-protocol/sdk-v2";

const LimitsQueryParamsSchema = object({
token: validAddress(),
Expand Down Expand Up @@ -150,7 +149,7 @@ const handler = async (
ethers.BigNumber.from("10").pow(18),
computedOriginChainId,
Number(destinationChainId),
utils.randomAddress(),
undefined,
tokenPriceNative
),
hubPool.callStatic.multicall(multicallInput, { blockTag: BLOCK_TAG_LAG }),
Expand Down

0 comments on commit 6821268

Please sign in to comment.