Skip to content

Commit

Permalink
improve: use optional param
Browse files Browse the repository at this point in the history
  • Loading branch information
james-a-morris committed Oct 25, 2023
1 parent b16d52d commit 572ce1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/suggested-fees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const SuggestedFeesQueryParamsSchema = type({
timestamp: optional(positiveIntStr()),
skipAmountLimit: optional(boolStr()),
message: optional(string()),
recipientAddress: validAddress(),
recipientAddress: optional(validAddress()),
relayerAddress: optional(validAddress()),
});

Expand Down Expand Up @@ -78,6 +78,7 @@ const handler = async (
}

relayerAddress ??= sdk.constants.DEFAULT_SIMULATED_RELAYER_ADDRESS;
recipientAddress ??= sdk.constants.DEFAULT_SIMULATED_RELAYER_ADDRESS;
token = ethers.utils.getAddress(token);

const [latestBlock, tokenDetails] = await Promise.all([
Expand Down

0 comments on commit 572ce1e

Please sign in to comment.