Skip to content

Commit 2f014e5

Browse files
committed
Merge pull-request #1083
2 parents 4555d99 + 658b89c commit 2f014e5

File tree

7 files changed

+20
-15
lines changed

7 files changed

+20
-15
lines changed

.changeset/smart-parrots-attend.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@turnkey/react-wallet-kit": patch
3+
---
4+
5+
Minor fixes - change on-ramp to onramp and change sandbox info text to match primary colour

examples/react-components/src/app/dashboard/OnRamp.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const OnRamp = ({ ethAddress }: OnRampProps) => {
4646
);
4747
}
4848
} catch (error) {
49-
console.error("Failed to init Coinbase on-ramp:", error);
49+
console.error("Failed to init Coinbase onramp:", error);
5050
}
5151
};
5252

@@ -74,7 +74,7 @@ export const OnRamp = ({ ethAddress }: OnRampProps) => {
7474
);
7575
}
7676
} catch (error) {
77-
console.error("Failed to init MoonPay on-ramp:", error);
77+
console.error("Failed to init MoonPay onramp:", error);
7878
}
7979
};
8080

examples/with-sdk-js/src/app/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export default function AuthPage() {
163163
const handleOnRamp = async () => {
164164
try {
165165
if (!wallets.length || !wallets[0].accounts?.length) {
166-
console.error("No wallets available for on-ramp");
166+
console.error("No wallets available for onramp");
167167
return;
168168
}
169169

@@ -172,7 +172,7 @@ export default function AuthPage() {
172172
);
173173

174174
if (!evmAccount) {
175-
console.error("No EVM-compatible account found for on-ramp");
175+
console.error("No EVM-compatible account found for onramp");
176176
return;
177177
}
178178

@@ -183,7 +183,7 @@ export default function AuthPage() {
183183
sandboxMode: true,
184184
});
185185
} catch (err) {
186-
console.error("Fiat On-Ramp failed:", err);
186+
console.error("Fiat OnRamp failed:", err);
187187
}
188188
};
189189

packages/react-wallet-kit/src/components/onramp/OnRamp.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export function OnRampPage({
5454
)}
5555
>
5656
<ActionPage
57-
title="Initiating On-Ramp"
57+
title="Initiating OnRamp"
5858
icon={icon}
5959
action={async () => {
6060
try {
@@ -72,7 +72,7 @@ export function OnRampPage({
7272
: "Use the MoonPay popup to finish funding your account."}
7373
</div>
7474
{sandboxMode && (
75-
<div className="mt-2 text-xs text-blue-500 dark:text-blue-400">
75+
<div className="mt-2 text-xs text-primary-light dark:text-primary-dark">
7676
Sandbox mode — no real funds will be used.
7777
</div>
7878
)}

packages/react-wallet-kit/src/providers/client/Provider.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5464,14 +5464,14 @@ export const ClientProvider: React.FC<ClientProviderProps> = ({
54645464
};
54655465

54665466
pushPage({
5467-
key: "Fiat On-Ramp",
5467+
key: "Fiat OnRamp",
54685468
content: <OnRampContainer />,
54695469
showTitle: false,
54705470
preventBack: true,
54715471
onClose: () =>
54725472
reject(
54735473
new TurnkeyError(
5474-
"User canceled the on-ramp process.",
5474+
"User canceled the onramp process.",
54755475
TurnkeyErrorCodes.USER_CANCELED,
54765476
),
54775477
),

packages/react-wallet-kit/src/providers/client/Types.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -744,9 +744,9 @@ export type ClientContextType = Override<
744744
) => Promise<void>;
745745

746746
/**
747-
* Handles the fiat on-ramp process for converting fiat currency into crypto and funding a wallet.
747+
* Handles the fiat onramp process for converting fiat currency into crypto and funding a wallet.
748748
*
749-
* - Initializes a fiat on-ramp transaction with a specified provider (e.g., Coinbase or MoonPay).
749+
* - Initializes a fiat onramp transaction with a specified provider (e.g., Coinbase or MoonPay).
750750
* - Opens the provider flow in a new window and polls the transaction status until completion.
751751
* - Displays a modal to show progress and success state.
752752
* - Supports both sandbox and production modes.
@@ -756,7 +756,7 @@ export type ClientContextType = Override<
756756
* @param params.cryptoCurrencyCode - optional cryptocurrency to purchase, e.g., FIAT_ON_RAMP_CRYPTO_CURRENCY_BTC, defaults to the native currency associated with the network/wallet address passed in.
757757
* @param params.fiatCurrencyCode - optional fiat currency to use, e.g., FIAT_ON_RAMP_CURRENCY_ETH.
758758
* @param params.fiatCurrencyAmount - optional preset fiat amount, e.g., '100'.
759-
* @param params.onrampProvider - optional on-ramp provider, e.g., FIAT_ON_RAMP_PROVIDER_COINBASE or FIAT_ON_RAMP_PROVIDER_MOONPAY, defaults to FIAT_ON_RAMP_PROVIDER_MOONPAY.
759+
* @param params.onrampProvider - optional onramp provider, e.g., FIAT_ON_RAMP_PROVIDER_COINBASE or FIAT_ON_RAMP_PROVIDER_MOONPAY, defaults to FIAT_ON_RAMP_PROVIDER_MOONPAY.
760760
* @param params.paymentMethod - optional payment method, e.g., FIAT_ON_RAMP_PAYMENT_METHOD_CREDIT_DEBIT_CARD.
761761
* @param params.countryCode - optional ISO 3166-1 country code.
762762
* @param params.countrySubdivisionCode - optional ISO 3166-2 subdivision code, e.g., NY.
@@ -765,8 +765,8 @@ export type ClientContextType = Override<
765765
* @param params.organizationId - organization ID to specify the sub-organization (defaults to the current session's organizationId).
766766
* @param params.stampWith - parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
767767
* @param params.successPageDuration - optional duration (in ms) for the success page after connecting (default: 2000ms).
768-
* @param params.openInNewTab: optional boolean on whether to open the on-ramp URL in a new browser tab or popup
769-
* @returns A promise that resolves when the on-ramp flow completes successfully.
768+
* @param params.openInNewTab: optional boolean on whether to open the onramp URL in a new browser tab or popup
769+
* @returns A promise that resolves when the onramp flow completes successfully.
770770
* @throws {TurnkeyError} If initialization fails, polling fails, or the user cancels the process.
771771
*/
772772
handleOnRamp: (params: HandleOnRampParams) => Promise<void>;

packages/react-wallet-kit/src/types/method-types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,5 +277,5 @@ export type HandleOnRampParams = {
277277
userId?: string; // Optional end user ID
278278
stampWith?: StamperType; // Stamper type (passkey, api key, wallet, etc.)
279279
successPageDuration?: number; // Duration for success page in ms (0 disables it)
280-
openInNewTab?: boolean; // Whether to open the on-ramp URL in a new browser tab or popup
280+
openInNewTab?: boolean; // Whether to open the onramp URL in a new browser tab or popup
281281
};

0 commit comments

Comments
 (0)