Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
6 changes: 6 additions & 0 deletions packages/react/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"useTabs": false,
"singleQuote": false,
"trailingComma": "all",
"printWidth": 80
}
6 changes: 6 additions & 0 deletions packages/sdk/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"useTabs": false,
"singleQuote": false,
"trailingComma": "all",
"printWidth": 80
}
2 changes: 2 additions & 0 deletions packages/sdk/src/internal/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
array,
assign,
bigint,
boolean,
define,
number,
object,
Expand Down Expand Up @@ -35,6 +36,7 @@ const BridgeCoreSchema = object({
amount: numberLike,
threshold: optional(number()),
sourceChains: optional(array(number())),
enableSwaps: optional(boolean()),
});

const BridgeCoreWithRecipientSchema = assign(
Expand Down
4 changes: 4 additions & 0 deletions packages/sdk/src/sprinter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ export class Sprinter {
* - `recipient` (optional): The address of the recipient of any leftover tokens.
* - `threshold` (optional): The minimum amount threshold required for the transfer.
* - `sourceChains` (optional): An array of whitelisted source chain IDs for the transfer.
* - `enableSwaps` {boolean} (optional): Whether to enable token swaps on the source chain.
*
* @param {FetchOptions} [options] - Optional configuration for the fetch request, such as custom headers or query parameters.
*
Expand All @@ -372,6 +373,7 @@ export class Sprinter {
* token: "USDC",
* amount: "100000000",
* recipient: "0xRecipientAddress", // Optional recipient of leftover tokens
* enableSwaps: true, // Enabling swaps on the source chain
* };
*
* sprinter.transfer(settings).then(solution => {
Expand Down Expand Up @@ -422,6 +424,7 @@ export class Sprinter {
* - `recipient` {string} (optional): The address of the recipient of any leftover tokens.
* - `sourceChains` {Array<number>} (optional): An array of source chain IDs to be considered for the transfer.
* - `threshold` {number} (optional): The minimum amount threshold required for the transfer.
* - `enableSwaps` {boolean} (optional): Whether to enable token swaps on the source chain.
*
* @param {FetchOptions} [options] - Optional configuration for the fetch request, such as custom headers or query parameters.
*
Expand All @@ -444,6 +447,7 @@ export class Sprinter {
* gasLimit: 21000,
* },
* recipient: "0xRecipientAddress", // for sending leftover tokens
* enableSwaps: true, // Enabling swaps on the source chain
* };
*
* sprinter.transferWithHook(settings).then(solution => {
Expand Down
Loading