Skip to content

Commit

Permalink
[Release] Bugfix - XRP custom UI missing (#7109)
Browse files Browse the repository at this point in the history
* Brings back XRP LLD custom UI

* Brings back XRP LLM custom UI

* changeset
  • Loading branch information
lambertkevin committed Jun 17, 2024
1 parent cfade88 commit 9707d0d
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 27 deletions.
6 changes: 6 additions & 0 deletions .changeset/sixty-trains-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"ledger-live-desktop": patch
"live-mobile": patch
---

Brings back the Custom UIs of XRP family in LLM & LLD (dropped due to the renamming of the family from ripple to xrp)
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const InputRight = styled(Box).attrs(() => ({
pr: 3,
}))``;
function FeesField({ account, transaction, onChange, status, trackProperties = {} }: Props) {
invariant(transaction.family === "xrp", "FeeField: ripple family expected");
invariant(transaction.family === "xrp", "FeeField: xrp family expected");
const bridge = getAccountBridge(account);
const onChangeFee = useCallback(
(fee: BigNumber) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export type SendFundsNavigatorStackParamList = {
| ScreenName.SendSelectDevice
| ScreenName.SwapForm;
};
[ScreenName.RippleEditFee]: {
[ScreenName.XrpEditFee]: {
accountId: string;
parentId?: string;
transaction: RippleTransaction;
Expand Down Expand Up @@ -266,7 +266,7 @@ export type SendFundsNavigatorStackParamList = {
| ScreenName.SendSelectDevice
| ScreenName.SwapForm;
};
[ScreenName.RippleEditTag]: {
[ScreenName.XrpEditTag]: {
accountId: string;
parentId?: string;
transaction: RippleTransaction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export type SignTransactionNavigatorParamList = {
| ScreenName.SendSelectDevice
| ScreenName.SwapForm;
};
[ScreenName.RippleEditFee]: {
[ScreenName.XrpEditFee]: {
accountId: string;
parentId?: string;
transaction: RippleTransaction;
Expand Down Expand Up @@ -238,7 +238,7 @@ export type SignTransactionNavigatorParamList = {
| ScreenName.SendSelectDevice
| ScreenName.SwapForm;
};
[ScreenName.RippleEditTag]: {
[ScreenName.XrpEditTag]: {
accountId: string;
parentId?: string;
transaction: RippleTransaction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export type SwapNavigatorParamList = {
| ScreenName.SendSelectDevice
| ScreenName.SwapForm;
};
[ScreenName.RippleEditFee]: {
[ScreenName.XrpEditFee]: {
accountId: string;
parentId?: string;
transaction: RippleTransaction;
Expand Down Expand Up @@ -235,7 +235,7 @@ export type SwapNavigatorParamList = {
| ScreenName.SendSelectDevice
| ScreenName.SwapForm;
};
[ScreenName.RippleEditTag]: {
[ScreenName.XrpEditTag]: {
accountId: string;
parentId?: string;
transaction: RippleTransaction;
Expand Down
4 changes: 2 additions & 2 deletions apps/ledger-live-mobile/src/const/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ export enum ScreenName {
RegionSettings = "RegionSettings",
RepairDevice = "RepairDevice",
Resources = "Resources",
RippleEditFee = "RippleEditFee",
RippleEditTag = "RippleEditTag",
XrpEditFee = "XrpEditFee",
XrpEditTag = "XrpEditTag",
ScanAccounts = "ScanAccounts",
ScanRecipient = "ScanRecipient",
SendAmountCoin = "SendAmountCoin",
Expand Down
2 changes: 1 addition & 1 deletion apps/ledger-live-mobile/src/families/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export * from "./hedera";
export * from "./internet_computer";
export * from "./near";
export * from "./polkadot";
export * from "./ripple";
export * from "./xrp";
export * from "./solana";
export * from "./stacks";
export * from "./casper";
Expand Down
4 changes: 0 additions & 4 deletions apps/ledger-live-mobile/src/families/ripple/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type RouteParams = {
transaction: Transaction;
};

function RippleEditFee({ route }: Props) {
function XrpEditFee({ route }: Props) {
const { colors } = useTheme();
const { account } = useSelector(accountScreenSelector(route));
if (!account) return null;
Expand All @@ -47,7 +47,7 @@ function RippleEditFee({ route }: Props) {
);
}

export { options, RippleEditFee as component };
export { options, XrpEditFee as component };
const styles = StyleSheet.create({
root: {
flex: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { BaseComposite } from "~/components/RootNavigator/types/helpers";
import { SendFundsNavigatorStackParamList } from "~/components/RootNavigator/types/SendFundsNavigator";

type NavigationProps = BaseComposite<
StackScreenProps<SendFundsNavigatorStackParamList, ScreenName.RippleEditTag>
StackScreenProps<SendFundsNavigatorStackParamList, ScreenName.XrpEditTag>
>;

const uint32maxPlus1 = BigNumber(2).pow(32);
Expand All @@ -28,7 +28,7 @@ const options = {
headerLeft: undefined,
};

function RippleEditTag({ route, navigation }: NavigationProps) {
function XrpEditTag({ route, navigation }: NavigationProps) {
const { colors } = useTheme();
const { account } = useSelector(accountScreenSelector(route));
const { t } = useTranslation();
Expand Down Expand Up @@ -111,7 +111,7 @@ function RippleEditTag({ route, navigation }: NavigationProps) {
);
}

export { options, RippleEditTag as component };
export { options, XrpEditTag as component };
const styles = StyleSheet.create({
root: {
flex: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ type Props = {
account: Account;
transaction: Transaction;
} & Navigation;
export default function RippleTagRow({ account, transaction }: Props) {
export default function XrpTagRow({ account, transaction }: Props) {
const { colors } = useTheme();
const navigation = useNavigation<Navigation["navigation"]>();
const route = useRoute<Navigation["route"]>();
const { locale } = useSettings();
const editTag = useCallback(() => {
navigation.navigate(ScreenName.RippleEditTag, {
navigation.navigate(ScreenName.XrpEditTag, {
...route.params,
accountId: account.id,
parentId: undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type Props = {
transaction: Transaction;
account: Account;
} & Navigation;
export default function RippleSendRowsCustom(props: Props) {
export default function XrpSendRowsCustom(props: Props) {
const { transaction, ...rest } = props;
return <SendRowTag {...rest} transaction={transaction} />;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import type { Account, AccountLike } from "@ledgerhq/types-live";
import type { Transaction } from "@ledgerhq/live-common/generated/types";
import type { CompositeScreenProps } from "@react-navigation/native";
import RippleFeeRow from "./RippleFeeRow";
import XrpFeeRow from "./XrpFeeRow";
import type { BaseNavigatorStackParamList } from "~/components/RootNavigator/types/BaseNavigator";
import type { StackNavigatorProps } from "~/components/RootNavigator/types/helpers";
import type { SendFundsNavigatorStackParamList } from "~/components/RootNavigator/types/SendFundsNavigator";
Expand All @@ -21,8 +21,8 @@ type Props = {
StackNavigatorProps<BaseNavigatorStackParamList>
>;

export default function RippleSendRowsFee(props: Props) {
export default function XrpSendRowsFee(props: Props) {
const { account } = props;
if (account.type !== "Account") return null;
return <RippleFeeRow {...props} />;
return <XrpFeeRow {...props} />;
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ type Props = {
transaction: Transaction;
};

export default function RippleFeeRow({ account, transaction, parentAccount }: Props) {
export default function XrpFeeRow({ account, transaction, parentAccount }: Props) {
const { colors } = useTheme();
const navigation = useNavigation<Navigation>();
const route = useRoute<Route>();
const openFees = useCallback(() => {
navigation.navigate(ScreenName.RippleEditFee, {
navigation.navigate(ScreenName.XrpEditFee, {
...route.params,
accountId: account.id,
parentId: parentAccount?.id,
Expand Down
4 changes: 4 additions & 0 deletions apps/ledger-live-mobile/src/families/xrp/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import * as XrpEditFee from "./ScreenEditFee";
import * as XrpEditTag from "./ScreenEditTag";

export { XrpEditFee, XrpEditTag };

0 comments on commit 9707d0d

Please sign in to comment.