Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/app/(mobile-ui)/withdraw/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default function WithdrawPage() {
error,
setUsdAmount,
resetWithdrawFlow,
setShowAllWithdrawMethods,
} = useWithdrawFlow()

// choose the first screen: if an amount already exists we jump straight to the method list
Expand Down Expand Up @@ -74,6 +75,7 @@ export default function WithdrawPage() {
useEffect(() => {
if (amountFromContext && parseFloat(amountFromContext) > 0) {
setStep('selectMethod')

if (!rawTokenAmount) {
setRawTokenAmount(amountFromContext)
}
Expand All @@ -87,6 +89,13 @@ export default function WithdrawPage() {
}
}, [amountFromContext, step])

useEffect(() => {
// If amount is available (i.e) user clicked back from select method view, show all methods
if (amountFromContext) {
setShowAllWithdrawMethods(true)
}
}, [])
Comment thread
Zishan-7 marked this conversation as resolved.

const validateAmount = useCallback(
(amountStr: string): boolean => {
if (!amountStr) {
Expand Down
5 changes: 2 additions & 3 deletions src/components/Profile/components/ProfileHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({
const { user: authenticatedUser } = useAuth()
const isAuthenticatedUserVerified = authenticatedUser?.user.bridgeKycStatus === 'approved'
const [isDrawerOpen, setIsDrawerOpen] = useState(false)
const isSelfProfile = authenticatedUser?.user.username?.toLowerCase() === username.toLowerCase()

const profileUrl = `${BASE_URL}/${username}`

console.log('isVerified', isVerified)

return (
<>
<div className={twMerge('flex flex-col items-center space-y-2', className)}>
Expand All @@ -49,7 +48,7 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({
className="text-2xl font-bold"
iconSize={20}
haveSentMoneyToUser={haveSentMoneyToUser}
isAuthenticatedUserVerified={isAuthenticatedUserVerified}
isAuthenticatedUserVerified={isAuthenticatedUserVerified && isSelfProfile} // can be true only for self profile
/>
{/* Username with share drawer */}
{showShareButton && (
Expand Down
Loading