-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement Keysign swap payload handling and enhance swap quote …
…provider integration - Added `toKeysignSwapPayload` function to validate and transform swap payloads. - Introduced `oneInchName` constant for better swap provider name management. - Updated `getSwapQuoteProviderName` to utilize the new `oneInchName` constant. - Enhanced `KeysignSwapTxInfo` component to display detailed swap transaction information, including asset allowances and amounts. - Added new translations for 'From Asset', 'To Asset', 'Allowance spender', and 'Allowance amount' in English locale.
- Loading branch information
Showing
6 changed files
with
77 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const oneInchName = '1inch'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import { matchRecordUnion } from '../../../lib/utils/matchRecordUnion'; | ||
import { oneInchName } from '../oneInch/config'; | ||
import { SwapQuote } from './SwapQuote'; | ||
|
||
export const getSwapQuoteProviderName = (quote: SwapQuote) => { | ||
return matchRecordUnion(quote, { | ||
native: ({ swapChain }) => swapChain, | ||
oneInch: () => '1inch', | ||
oneInch: () => oneInchName, | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters