Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
c46a613c
Commit
c46a613c
authored
Nov 06, 2024
by
Uniswap Labs Service Account
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci(release): publish latest release
parent
be21e483
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
55 additions
and
64 deletions
+55
-64
RELEASE
RELEASE
+8
-7
VERSION
VERSION
+1
-1
StatsigProvider.tsx
apps/extension/src/app/StatsigProvider.tsx
+5
-1
EditLabelModal.tsx
apps/extension/src/app/features/accounts/EditLabelModal.tsx
+1
-1
ClaimUnitagScreen.tsx
...tension/src/app/features/onboarding/ClaimUnitagScreen.tsx
+1
-1
hooks.test.ts
apps/mobile/src/components/explore/hooks.test.ts
+1
-1
hooks.ts
apps/mobile/src/components/explore/hooks.ts
+1
-1
ClickableWithinGesture.web.tsx
.../components/swipeablecards/ClickableWithinGesture.web.tsx
+1
-5
ActionSheetDropdown.tsx
.../uniswap/src/components/dropdowns/ActionSheetDropdown.tsx
+3
-7
slice.ts
packages/uniswap/src/features/favorites/slice.ts
+0
-1
DecimalPadInput.tsx
...features/transactions/DecimalPadInput/DecimalPadInput.tsx
+1
-1
en-US.json
packages/uniswap/src/i18n/locales/source/en-US.json
+1
-0
LandingBackground.tsx
packages/wallet/src/components/landing/LandingBackground.tsx
+2
-2
AnimatedNumber.tsx
packages/wallet/src/features/portfolio/AnimatedNumber.tsx
+0
-1
ClaimUnitagContent.tsx
packages/wallet/src/features/unitags/ClaimUnitagContent.tsx
+20
-23
EditUnitagProfileContent.tsx
.../wallet/src/features/unitags/EditUnitagProfileContent.tsx
+5
-5
hooks.ts
packages/wallet/src/features/unitags/hooks.ts
+4
-6
No files found.
RELEASE
View file @
c46a613c
### Lots of new updates!
### Lots of new updates!
### Bridging
### Bridging
You can now swap your ETH, USDC, and more across 8+ networks! Try it by pressing the banner on your homepage.
You can now swap your ETH, USDC, and more across 8+ networks! Try it by pressing the banner on your homepage.
###
Claim usernames
###
Faster Onboarding
You can now claim a free uni.eth for your wallet address, a readable username that makess it easy to identify your wallet and receive crypto.
New users can create a wallet lightning fast.
### Multichain Explore
### Multichain Explore
...
@@ -16,6 +16,7 @@ Users can now see all 12 chains we support on the Explore page, and can also fil
...
@@ -16,6 +16,7 @@ Users can now see all 12 chains we support on the Explore page, and can also fil
Users now have access to all ur regular features for this new chain.
Users now have access to all ur regular features for this new chain.
### Other changes
:
### Other changes
- Better redirect handling on fiat onramp
- Various bug fixes and performance improvements
- Various bug fixes and performance improvements
VERSION
View file @
c46a613c
extension/1.8.0
mobile/1.38
\ No newline at end of file
\ No newline at end of file
apps/extension/src/app/StatsigProvider.tsx
View file @
c46a613c
...
@@ -4,6 +4,7 @@ import { getStatsigEnvironmentTier } from 'src/app/version'
...
@@ -4,6 +4,7 @@ import { getStatsigEnvironmentTier } from 'src/app/version'
import
Statsig
from
'
statsig-js
'
// Use JS package for browser
import
Statsig
from
'
statsig-js
'
// Use JS package for browser
import
{
uniswapUrls
}
from
'
uniswap/src/constants/urls
'
import
{
uniswapUrls
}
from
'
uniswap/src/constants/urls
'
import
{
DUMMY_STATSIG_SDK_KEY
,
StatsigCustomAppValue
}
from
'
uniswap/src/features/gating/constants
'
import
{
DUMMY_STATSIG_SDK_KEY
,
StatsigCustomAppValue
}
from
'
uniswap/src/features/gating/constants
'
import
{
FeatureFlags
,
getFeatureFlagName
}
from
'
uniswap/src/features/gating/flags
'
import
{
StatsigOptions
,
StatsigProvider
,
StatsigUser
}
from
'
uniswap/src/features/gating/sdk/statsig
'
import
{
StatsigOptions
,
StatsigProvider
,
StatsigUser
}
from
'
uniswap/src/features/gating/sdk/statsig
'
import
{
getUniqueId
}
from
'
utilities/src/device/getUniqueId
'
import
{
getUniqueId
}
from
'
utilities/src/device/getUniqueId
'
import
{
useAsyncData
}
from
'
utilities/src/react/hooks
'
import
{
useAsyncData
}
from
'
utilities/src/react/hooks
'
...
@@ -50,7 +51,10 @@ export function ExtensionStatsigProvider({
...
@@ -50,7 +51,10 @@ export function ExtensionStatsigProvider({
disableErrorLogging
:
true
,
disableErrorLogging
:
true
,
initCompletionCallback
:
()
=>
{
initCompletionCallback
:
()
=>
{
setInitFinished
(
true
)
setInitFinished
(
true
)
const
datadogEnabled
=
Statsig
.
checkGate
(
getFeatureFlagName
(
FeatureFlags
.
Datadog
))
if
(
datadogEnabled
)
{
initializeDatadog
(
appName
).
catch
(()
=>
undefined
)
initializeDatadog
(
appName
).
catch
(()
=>
undefined
)
}
},
},
}
}
...
...
apps/extension/src/app/features/accounts/EditLabelModal.tsx
View file @
c46a613c
...
@@ -37,7 +37,7 @@ export function EditLabelModal({ isOpen, address, onClose }: EditLabelModalProps
...
@@ -37,7 +37,7 @@ export function EditLabelModal({ isOpen, address, onClose }: EditLabelModalProps
const
[
inputText
,
setInputText
]
=
useState
<
string
>
(
defaultText
)
const
[
inputText
,
setInputText
]
=
useState
<
string
>
(
defaultText
)
const
[
isfocused
,
setIsFocused
]
=
useState
(
false
)
const
[
isfocused
,
setIsFocused
]
=
useState
(
false
)
const
{
canClaimUnitag
}
=
useCanActiveAddressClaimUnitag
(
address
)
const
{
canClaimUnitag
}
=
useCanActiveAddressClaimUnitag
()
const
unitagsClaimEnabled
=
useFeatureFlag
(
FeatureFlags
.
ExtensionClaimUnitag
)
const
unitagsClaimEnabled
=
useFeatureFlag
(
FeatureFlags
.
ExtensionClaimUnitag
)
const
onConfirm
=
useCallback
(
async
()
=>
{
const
onConfirm
=
useCallback
(
async
()
=>
{
...
...
apps/extension/src/app/features/onboarding/ClaimUnitagScreen.tsx
View file @
c46a613c
...
@@ -50,7 +50,7 @@ export function ClaimUnitagScreen(): JSX.Element {
...
@@ -50,7 +50,7 @@ export function ClaimUnitagScreen(): JSX.Element {
onBack=
{
handleBack
}
onBack=
{
handleBack
}
onSkip=
{
goToNextStep
}
onSkip=
{
goToNextStep
}
>
>
<
Flex
gap=
"$spacing16"
p
t
=
"$spacing24"
width=
"100%"
>
<
Flex
gap=
"$spacing16"
p
y
=
"$spacing24"
width=
"100%"
>
<
ClaimUnitagContent
<
ClaimUnitagContent
animateY=
{
false
}
animateY=
{
false
}
entryPoint=
{
ExtensionOnboardingFlow
.
New
}
entryPoint=
{
ExtensionOnboardingFlow
.
New
}
...
...
apps/mobile/src/components/explore/hooks.test.ts
View file @
c46a613c
...
@@ -206,7 +206,7 @@ describe(useExploreTokenContextMenu, () => {
...
@@ -206,7 +206,7 @@ describe(useExploreTokenContextMenu, () => {
payload
:
{
payload
:
{
name
:
'
swap-modal
'
,
name
:
'
swap-modal
'
,
initialState
:
{
initialState
:
{
exactAmountToken
:
'
0
'
,
exactAmountToken
:
''
,
exactCurrencyField
:
'
input
'
,
exactCurrencyField
:
'
input
'
,
[
CurrencyField
.
INPUT
]:
null
,
[
CurrencyField
.
INPUT
]:
null
,
[
CurrencyField
.
OUTPUT
]:
{
[
CurrencyField
.
OUTPUT
]:
{
...
...
apps/mobile/src/components/explore/hooks.ts
View file @
c46a613c
...
@@ -59,7 +59,7 @@ export function useExploreTokenContextMenu({
...
@@ -59,7 +59,7 @@ export function useExploreTokenContextMenu({
const
onPressSwap
=
useCallback
(()
=>
{
const
onPressSwap
=
useCallback
(()
=>
{
const
swapFormState
:
TransactionState
=
{
const
swapFormState
:
TransactionState
=
{
exactCurrencyField
:
CurrencyField
.
INPUT
,
exactCurrencyField
:
CurrencyField
.
INPUT
,
exactAmountToken
:
'
0
'
,
exactAmountToken
:
''
,
[
CurrencyField
.
INPUT
]:
null
,
[
CurrencyField
.
INPUT
]:
null
,
[
CurrencyField
.
OUTPUT
]:
{
[
CurrencyField
.
OUTPUT
]:
{
chainId
,
chainId
,
...
...
packages/ui/src/components/swipeablecards/ClickableWithinGesture.web.tsx
View file @
c46a613c
...
@@ -8,9 +8,5 @@ export function ClickableWithinGesture({ onPress, children }: ClickableWithinGes
...
@@ -8,9 +8,5 @@ export function ClickableWithinGesture({ onPress, children }: ClickableWithinGes
onPress
?.()
onPress
?.()
}
}
return
(
return
<
TouchableArea
onPress=
{
onCloseWithPropagationStop
}
>
{
children
}
</
TouchableArea
>
<
TouchableArea
flex=
{
1
}
flexGrow=
{
1
}
onPress=
{
onCloseWithPropagationStop
}
>
{
children
}
</
TouchableArea
>
)
}
}
packages/uniswap/src/components/dropdowns/ActionSheetDropdown.tsx
View file @
c46a613c
...
@@ -20,7 +20,7 @@ import { BaseCard } from 'uniswap/src/components/BaseCard/BaseCard'
...
@@ -20,7 +20,7 @@ import { BaseCard } from 'uniswap/src/components/BaseCard/BaseCard'
import
{
Scrollbar
}
from
'
uniswap/src/components/misc/Scrollbar
'
import
{
Scrollbar
}
from
'
uniswap/src/components/misc/Scrollbar
'
import
{
MenuItemProp
}
from
'
uniswap/src/components/modals/ActionSheetModal
'
import
{
MenuItemProp
}
from
'
uniswap/src/components/modals/ActionSheetModal
'
import
{
useAppInsets
}
from
'
uniswap/src/hooks/useAppInsets
'
import
{
useAppInsets
}
from
'
uniswap/src/hooks/useAppInsets
'
import
{
isAndroid
,
isInterface
,
is
MobileApp
,
is
Touchable
}
from
'
utilities/src/platform
'
import
{
isAndroid
,
isInterface
,
isTouchable
}
from
'
utilities/src/platform
'
const
DEFAULT_MIN_WIDTH
=
225
const
DEFAULT_MIN_WIDTH
=
225
...
@@ -178,15 +178,11 @@ const ActionSheetBackdropWithContent = memo(function ActionSheetBackdropWithCont
...
@@ -178,15 +178,11 @@ const ActionSheetBackdropWithContent = memo(function ActionSheetBackdropWithCont
closeOnSelect
:
boolean
closeOnSelect
:
boolean
}):
JSX
.
Element
{
}):
JSX
.
Element
{
/*
/*
We need to add key to Portal
on mobile
, becuase of a bug in tamagui.
We need to add key to Portal, becuase of a bug in tamagui.
Remove when https://linear.app/uniswap/issue/WALL-4817/tamaguis-portal-stops-reacting-to-re-renders is done
Remove when https://linear.app/uniswap/issue/WALL-4817/tamaguis-portal-stops-reacting-to-re-renders is done
*/
*/
const
key
=
useMemo
(
()
=>
(
isMobileApp
?
Math
.
random
()
:
undefined
),
// eslint-disable-next-line react-hooks/exhaustive-deps
[
closeDropdown
,
styles
,
isOpen
,
toggleMeasurements
,
contentProps
,
closeOnSelect
],
)
return
(
return
(
<
Portal
key=
{
key
}
zIndex=
{
styles
?.
dropdownZIndex
||
zIndices
.
popover
}
>
<
Portal
key=
{
Math
.
random
()
}
zIndex=
{
styles
?.
dropdownZIndex
||
zIndices
.
popover
}
>
<
AnimatePresence
custom=
{
{
isOpen
}
}
>
<
AnimatePresence
custom=
{
{
isOpen
}
}
>
{
isOpen
&&
toggleMeasurements
&&
(
{
isOpen
&&
toggleMeasurements
&&
(
<>
<>
...
...
packages/uniswap/src/features/favorites/slice.ts
View file @
c46a613c
...
@@ -90,7 +90,6 @@ export const slice = createSlice({
...
@@ -90,7 +90,6 @@ export const slice = createSlice({
{
payload
:
{
nftKey
,
isSpam
}
}:
PayloadAction
<
{
nftKey
:
string
;
isSpam
?:
boolean
}
>
,
{
payload
:
{
nftKey
,
isSpam
}
}:
PayloadAction
<
{
nftKey
:
string
;
isSpam
?:
boolean
}
>
,
)
=>
{
)
=>
{
const
isVisible
=
state
.
nftsVisibility
[
nftKey
]?.
isVisible
??
!
isSpam
const
isVisible
=
state
.
nftsVisibility
[
nftKey
]?.
isVisible
??
!
isSpam
state
.
nftsVisibility
[
nftKey
]
=
{
isVisible
:
!
isVisible
}
state
.
nftsVisibility
[
nftKey
]
=
{
isVisible
:
!
isVisible
}
},
},
},
},
...
...
packages/uniswap/src/features/transactions/DecimalPadInput/DecimalPadInput.tsx
View file @
c46a613c
...
@@ -83,7 +83,7 @@ export const DecimalPadInput = memo(
...
@@ -83,7 +83,7 @@ export const DecimalPadInput = memo(
useEffect
(()
=>
{
useEffect
(()
=>
{
updateDisabledKeys
(
valueRef
.
current
)
updateDisabledKeys
(
valueRef
.
current
)
// eslint-disable-next-line react-hooks/exhaustive-deps
// eslint-disable-next-line react-hooks/exhaustive-deps
},
[
valueRef
,
selectionRef
])
},
[
valueRef
,
selectionRef
,
maxDecimals
])
useImperativeHandle
(
ref
,
()
=>
({
useImperativeHandle
(
ref
,
()
=>
({
updateDisabledKeys
():
void
{
updateDisabledKeys
():
void
{
...
...
packages/uniswap/src/i18n/locales/source/en-US.json
View file @
c46a613c
...
@@ -2216,6 +2216,7 @@
...
@@ -2216,6 +2216,7 @@
"unitags.username.error.chars"
:
"Usernames can only contain letters and numbers"
,
"unitags.username.error.chars"
:
"Usernames can only contain letters and numbers"
,
"unitags.username.error.max"
:
"Usernames cannot be more than {{number}} characters"
,
"unitags.username.error.max"
:
"Usernames cannot be more than {{number}} characters"
,
"unitags.username.error.min"
:
"Usernames must be at least {{number}} characters"
,
"unitags.username.error.min"
:
"Usernames must be at least {{number}} characters"
,
"unitags.username.error.uppercase"
:
"Usernames can only contain lowercase letters and numbers"
,
"uwulink.error.insufficientTokens"
:
"Not enough {{tokenSymbol}} on {{chain}}"
,
"uwulink.error.insufficientTokens"
:
"Not enough {{tokenSymbol}} on {{chain}}"
,
"v2.notAvailable"
:
"Uniswap V2 is not available on this network."
,
"v2.notAvailable"
:
"Uniswap V2 is not available on this network."
,
"v2.switchTo"
:
"Switch to v2"
,
"v2.switchTo"
:
"Switch to v2"
,
...
...
packages/wallet/src/components/landing/LandingBackground.tsx
View file @
c46a613c
...
@@ -15,7 +15,7 @@ import Animated, {
...
@@ -15,7 +15,7 @@ import Animated, {
import
{
Circle
,
Defs
,
Svg
}
from
'
react-native-svg
'
import
{
Circle
,
Defs
,
Svg
}
from
'
react-native-svg
'
import
{
Flex
,
FlexProps
,
Image
,
isWeb
,
useIsDarkMode
}
from
'
ui/src
'
import
{
Flex
,
FlexProps
,
Image
,
isWeb
,
useIsDarkMode
}
from
'
ui/src
'
import
{
Jiggly
}
from
'
ui/src/animations
'
import
{
Jiggly
}
from
'
ui/src/animations
'
import
{
UNISWAP_
APP_ICON
,
UNISWAP_
LOGO
}
from
'
ui/src/assets
'
import
{
UNISWAP_LOGO
}
from
'
ui/src/assets
'
import
{
AnimatedFlex
}
from
'
ui/src/components/layout/AnimatedFlex
'
import
{
AnimatedFlex
}
from
'
ui/src/components/layout/AnimatedFlex
'
import
{
imageSizes
}
from
'
ui/src/theme
'
import
{
imageSizes
}
from
'
ui/src/theme
'
import
{
ONE_SECOND_MS
}
from
'
utilities/src/time/time
'
import
{
ONE_SECOND_MS
}
from
'
utilities/src/time/time
'
...
@@ -93,7 +93,7 @@ const OnboardingAnimation = ({
...
@@ -93,7 +93,7 @@ const OnboardingAnimation = ({
<
Image
<
Image
height=
{
isWeb
?
LOGO_SIZE_WEB
:
imageSizes
.
image100
}
height=
{
isWeb
?
LOGO_SIZE_WEB
:
imageSizes
.
image100
}
resizeMode=
"contain"
resizeMode=
"contain"
source=
{
isWeb
?
UNISWAP_LOGO
:
UNISWAP_APP_ICON
}
source=
{
UNISWAP_LOGO
}
width=
{
isWeb
?
LOGO_SIZE_WEB
:
imageSizes
.
image100
}
width=
{
isWeb
?
LOGO_SIZE_WEB
:
imageSizes
.
image100
}
/>
/>
</
Jiggly
>
</
Jiggly
>
...
...
packages/wallet/src/features/portfolio/AnimatedNumber.tsx
View file @
c46a613c
...
@@ -385,7 +385,6 @@ const ReanimatedNumber = ({
...
@@ -385,7 +385,6 @@ const ReanimatedNumber = ({
<
Text
<
Text
allowFontScaling=
{
false
}
allowFontScaling=
{
false
}
style=
{
[
AnimatedFontStyles
.
fontStyle
,
{
height
:
DIGIT_HEIGHT
,
fontFamily
:
fonts
.
buttonLabel1
.
family
}]
}
style=
{
[
AnimatedFontStyles
.
fontStyle
,
{
height
:
DIGIT_HEIGHT
,
fontFamily
:
fonts
.
buttonLabel1
.
family
}]
}
opacity=
{
0
}
>
>
{
loadingPlaceholderText
}
{
loadingPlaceholderText
}
</
Text
>
</
Text
>
...
...
packages/wallet/src/features/unitags/ClaimUnitagContent.tsx
View file @
c46a613c
...
@@ -145,7 +145,7 @@ export function ClaimUnitagContent({
...
@@ -145,7 +145,7 @@ export function ClaimUnitagContent({
onSetFontSize
(
text
+
UNITAG_SUFFIX_CHARS_ONLY
)
onSetFontSize
(
text
+
UNITAG_SUFFIX_CHARS_ONLY
)
}
}
setUnitagInputValue
(
text
?.
trim
()
.
toLocaleLowerCase
()
)
setUnitagInputValue
(
text
?.
trim
())
},
},
[
inputPlaceholder
,
onSetFontSize
],
[
inputPlaceholder
,
onSetFontSize
],
)
)
...
@@ -327,7 +327,6 @@ export function ClaimUnitagContent({
...
@@ -327,7 +327,6 @@ export function ClaimUnitagContent({
)
}
)
}
</
AnimatePresence
>
</
AnimatePresence
>
</
AnimatedFlex
>
</
AnimatedFlex
>
{
unitagAddress
&&
(
<
AnimatedFlex
<
AnimatedFlex
row
row
alignItems=
"center"
alignItems=
"center"
...
@@ -347,9 +346,7 @@ export function ClaimUnitagContent({
...
@@ -347,9 +346,7 @@ export function ClaimUnitagContent({
<
InfoCircleFilled
color=
{
colors
.
neutral3
.
get
()
}
size=
"$icon.20"
/>
<
InfoCircleFilled
color=
{
colors
.
neutral3
.
get
()
}
size=
"$icon.20"
/>
</
TouchableArea
>
</
TouchableArea
>
</
AnimatedFlex
>
</
AnimatedFlex
>
)
}
<
Flex
row
gap=
"$spacing8"
minHeight=
{
fonts
.
body2
.
lineHeight
}
>
<
Flex
row
gap=
"$spacing8"
minHeight=
{
fonts
.
body2
.
lineHeight
}
mt=
{
unitagAddress
?
undefined
:
'
$spacing24
'
}
>
<
Text
color=
"$statusCritical"
textAlign=
"center"
variant=
"body2"
>
<
Text
color=
"$statusCritical"
textAlign=
"center"
variant=
"body2"
>
{
canClaimUnitagNameError
}
{
canClaimUnitagNameError
}
</
Text
>
</
Text
>
...
...
packages/wallet/src/features/unitags/EditUnitagProfileContent.tsx
View file @
c46a613c
...
@@ -44,7 +44,6 @@ import { useWalletSigners } from 'wallet/src/features/wallet/context'
...
@@ -44,7 +44,6 @@ import { useWalletSigners } from 'wallet/src/features/wallet/context'
import
{
useAccount
}
from
'
wallet/src/features/wallet/hooks
'
import
{
useAccount
}
from
'
wallet/src/features/wallet/hooks
'
import
{
DisplayNameType
}
from
'
wallet/src/features/wallet/types
'
import
{
DisplayNameType
}
from
'
wallet/src/features/wallet/types
'
const
BIO_TEXT_INPUT_LINES
=
6
const
PADDING_WIDTH
=
isExtension
?
'
$none
'
:
'
$spacing16
'
const
PADDING_WIDTH
=
isExtension
?
'
$none
'
:
'
$spacing16
'
const
isProfileMetadataEdited
=
(
const
isProfileMetadataEdited
=
(
...
@@ -347,14 +346,13 @@ export function EditUnitagProfileContent({
...
@@ -347,14 +346,13 @@ export function EditUnitagProfileContent({
{
!
loading
?
(
{
!
loading
?
(
<
TextInput
<
TextInput
autoCorrect
autoCorrect
multiline=
{
isMobileApp
}
height=
{
fonts
.
subheading1
.
lineHeight
}
maxHeight=
{
fonts
.
body1
.
lineHeight
*
BIO_TEXT_INPUT_LINES
}
rows=
{
BIO_TEXT_INPUT_LINES
}
placeholder=
{
t
(
'
unitags.profile.bio.placeholder
'
)
}
placeholder=
{
t
(
'
unitags.profile.bio.placeholder
'
)
}
value=
{
bioInput
}
value=
{
bioInput
}
verticalAlign=
"top"
onChangeText=
{
setBioInput
}
onChangeText=
{
setBioInput
}
{
...
inputProps
}
{
...
inputProps
}
p
t=
"$spacing4"
m
t=
"$spacing4"
/>
/>
)
:
null
}
)
:
null
}
{
!
loading
?
(
{
!
loading
?
(
...
@@ -364,8 +362,10 @@ export function EditUnitagProfileContent({
...
@@ -364,8 +362,10 @@ export function EditUnitagProfileContent({
autoCapitalize=
"none"
autoCapitalize=
"none"
autoComplete=
"off"
autoComplete=
"off"
autoCorrect=
{
false
}
autoCorrect=
{
false
}
height=
{
fonts
.
subheading1
.
lineHeight
}
placeholder=
{
t
(
'
unitags.editProfile.placeholder
'
)
}
placeholder=
{
t
(
'
unitags.editProfile.placeholder
'
)
}
value=
{
twitterInput
}
value=
{
twitterInput
}
verticalAlign=
"top"
onChangeText=
{
onSetTwitterInput
}
onChangeText=
{
onSetTwitterInput
}
{
...
inputProps
}
{
...
inputProps
}
/>
/>
...
...
packages/wallet/src/features/unitags/hooks.ts
View file @
c46a613c
...
@@ -38,14 +38,10 @@ import { SignerManager } from 'wallet/src/features/wallet/signing/SignerManager'
...
@@ -38,14 +38,10 @@ import { SignerManager } from 'wallet/src/features/wallet/signing/SignerManager'
const
MIN_UNITAG_LENGTH
=
3
const
MIN_UNITAG_LENGTH
=
3
const
MAX_UNITAG_LENGTH
=
20
const
MAX_UNITAG_LENGTH
=
20
export
const
useCanActiveAddressClaimUnitag
=
(
export
const
useCanActiveAddressClaimUnitag
=
():
{
address
?:
Address
,
):
{
canClaimUnitag
:
boolean
canClaimUnitag
:
boolean
}
=>
{
}
=>
{
const
activeAddress
=
useActiveAccountAddressWithThrow
()
const
activeAddress
=
useActiveAccountAddressWithThrow
()
const
targetAddress
=
address
??
activeAddress
const
{
data
:
deviceId
}
=
useAsyncData
(
getUniqueId
)
const
{
data
:
deviceId
}
=
useAsyncData
(
getUniqueId
)
const
{
refetchUnitagsCounter
}
=
useUnitagUpdater
()
const
{
refetchUnitagsCounter
}
=
useUnitagUpdater
()
const
skip
=
!
deviceId
const
skip
=
!
deviceId
...
@@ -54,7 +50,7 @@ export const useCanActiveAddressClaimUnitag = (
...
@@ -54,7 +50,7 @@ export const useCanActiveAddressClaimUnitag = (
params
:
skip
params
:
skip
?
undefined
?
undefined
:
{
:
{
address
:
target
Address
,
address
:
active
Address
,
deviceId
,
deviceId
,
},
},
})
})
...
@@ -123,6 +119,8 @@ export const getUnitagFormatError = (unitag: string, t: TFunction): string | und
...
@@ -123,6 +119,8 @@ export const getUnitagFormatError = (unitag: string, t: TFunction): string | und
return
t
(
'
unitags.username.error.max
'
,
{
return
t
(
'
unitags.username.error.max
'
,
{
number
:
MAX_UNITAG_LENGTH
,
number
:
MAX_UNITAG_LENGTH
,
})
})
}
else
if
(
unitag
!==
unitag
.
toLowerCase
())
{
return
t
(
'
unitags.username.error.uppercase
'
)
}
else
if
(
!
UNITAG_VALID_REGEX
.
test
(
unitag
))
{
}
else
if
(
!
UNITAG_VALID_REGEX
.
test
(
unitag
))
{
return
t
(
'
unitags.username.error.chars
'
)
return
t
(
'
unitags.username.error.chars
'
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment