Skip to content

Conversation

tiankii
Copy link
Contributor

@tiankii tiankii commented May 20, 2025

The new payment success screen will have more details and a Share action.

image

@tiankii tiankii changed the title feat: redesign lnurl payment success screen feat: redesign payment success screen May 21, 2025
@tiankii tiankii marked this pull request as ready for review May 21, 2025 22:37
@tiankii
Copy link
Contributor Author

tiankii commented Jul 2, 2025

This is ready for review @dolcalmi

},
) => {
const { maxLength, maxResultLeft, maxResultRight } = options
if (typeof text !== "string") return ""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not necessary we are using typescript and in theory should be detected in compile time

if (typeof text !== "string") return ""
if (text.length <= maxLength) return text

if (typeof maxResultLeft === "number" && typeof maxResultRight === "number") {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

// Shorten a long text by inserting "..." in the middle, keeping the ends visible.
export const ellipsizeMiddle = (
text: string,
options: {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add default values

}

// Shorten a long text by inserting "..." in the middle, keeping the ends visible.
export const ellipsizeMiddle = (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs tests

}

// e.g. 1747691078 -> "2025-05-19 15:44"
export function formatUnixTimestampYMDHM(timestampInSeconds: number) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this not like .toISOString ?

new Date(1747691078 * 1000).toISOString().slice(0, 16).replace('T', ' ')


const useStyles = makeStyles(({ colors }) => ({
contentContainer: {
headerContainer: {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please validate if we can use relative values (i.e %)

<View>
<Text style={styles.inputStyle} type={"p3"}>
{textData.text}
{textData.url && " "}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the purpose of this?

url?: string
}

export const FieldWithEvent = ({ title, value, subValue }: FieldWithEventProps) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is subValue?

</>
)}
<View style={styles.fieldContainer}>
<FieldWithEvent title={title} value={text!} subValue={subText} />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please be consistent subValue={subText}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is not missing the new keys?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants