-
Notifications
You must be signed in to change notification settings - Fork 476
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SDK] feat: Enhance fiat onramp with multi-step flow and currency sup…
…port (#6323)
- Loading branch information
1 parent
1405289
commit 15adec4
Showing
29 changed files
with
1,146 additions
and
575 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"thirdweb": patch | ||
--- | ||
|
||
Fiat onramp UI revamp in PayEmbed and support multi hop onramp flows |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,34 @@ | ||
const SUPPORTED_FIAT_CURRENCIES = ["USD"] as const; | ||
const SUPPORTED_FIAT_CURRENCIES = [ | ||
"USD", | ||
"CAD", | ||
"GBP", | ||
"EUR", | ||
"JPY", | ||
"AUD", | ||
"NZD", | ||
] as const; | ||
/** | ||
* @internal | ||
*/ | ||
export type SupportedFiatCurrency = (typeof SUPPORTED_FIAT_CURRENCIES)[number]; | ||
|
||
export function getFiatSymbol(showBalanceInFiat: SupportedFiatCurrency) { | ||
switch (showBalanceInFiat) { | ||
case "USD": | ||
return "$"; | ||
case "CAD": | ||
return "$"; | ||
case "GBP": | ||
return "£"; | ||
case "EUR": | ||
return "€"; | ||
case "JPY": | ||
return "¥"; | ||
case "AUD": | ||
return "$"; | ||
case "NZD": | ||
return "$"; | ||
default: | ||
return "$"; | ||
} | ||
} |
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
Oops, something went wrong.