Skip to content

Commit

Permalink
Fix "unused variable" by using temp error
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiTimesChi committed Dec 22, 2023
1 parent bc4f087 commit 7740694
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/sdk-router/src/rfq/fastBridgeSet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ export class FastBridgeSet extends SynapseModuleSet {
destChainId: number
): Promise<Ticker[]> {
// TODO: hit Quoter API to get supported tickers, then unmarshall them
if (originChainId === destChainId) {
throw new Error('Same chain swaps are not supported')

Check warning on line 168 in packages/sdk-router/src/rfq/fastBridgeSet.ts

View check run for this annotation

Codecov / codecov/patch

packages/sdk-router/src/rfq/fastBridgeSet.ts#L168

Added line #L168 was not covered by tests
}
return []
}

Expand All @@ -179,6 +182,9 @@ export class FastBridgeSet extends SynapseModuleSet {
amount: BigNumber
): Promise<BigNumber> {
// TODO: hit Quoter API to get the quote for ticker.originToken -> ticker.destToken with the given amount
if (ticker.originToken.chainId === ticker.destToken.chainId) {
throw new Error('Same chain swaps are not supported')

Check warning on line 186 in packages/sdk-router/src/rfq/fastBridgeSet.ts

View check run for this annotation

Codecov / codecov/patch

packages/sdk-router/src/rfq/fastBridgeSet.ts#L186

Added line #L186 was not covered by tests
}
return amount

Check warning on line 188 in packages/sdk-router/src/rfq/fastBridgeSet.ts

View check run for this annotation

Codecov / codecov/patch

packages/sdk-router/src/rfq/fastBridgeSet.ts#L188

Added line #L188 was not covered by tests
}
}

0 comments on commit 7740694

Please sign in to comment.