Skip to content

Commit 1fcabfd

Browse files
author
ignaciosantise
committed
chore: code styling
1 parent 2cd8e55 commit 1fcabfd

File tree

7 files changed

+20
-23
lines changed

7 files changed

+20
-23
lines changed

packages/core/src/utils/TypeUtil.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,15 +288,15 @@ export interface W3mFrameProvider {
288288
newEmail: string;
289289
}>;
290290
syncTheme(payload: {
291-
themeMode?: ThemeMode | undefined;
292-
themeVariables?: Record<string, string | number> | undefined;
291+
themeMode: ThemeMode | undefined;
292+
themeVariables: Record<string, string | number> | undefined;
293293
}): Promise<unknown>;
294294
syncDappData(payload: {
295295
projectId: string;
296296
sdkVersion: SdkVersion;
297297
metadata?: Metadata;
298298
}): Promise<unknown>;
299-
connect(payload?: { chainId?: number | undefined }): Promise<{
299+
connect(payload?: { chainId: number | undefined }): Promise<{
300300
chainId: number;
301301
email: string;
302302
address: string;

packages/scaffold/src/partials/w3m-header/index.tsx

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,17 @@ export function Header() {
5757
const bottomPadding = header === ' ' ? '0' : '4xs';
5858

5959
return (
60-
<>
61-
<FlexView
62-
justifyContent="space-between"
63-
flexDirection="row"
64-
alignItems="center"
65-
padding={['l', 'xl', bottomPadding, 'xl']}
66-
>
67-
{dynamicButtonTemplate()}
68-
<Text variant="paragraph-600" numberOfLines={1}>
69-
{header}
70-
</Text>
71-
<IconLink icon="close" size="md" onPress={ModalController.close} testID="button-close" />
72-
</FlexView>
73-
</>
60+
<FlexView
61+
justifyContent="space-between"
62+
flexDirection="row"
63+
alignItems="center"
64+
padding={['l', 'xl', bottomPadding, 'xl']}
65+
>
66+
{dynamicButtonTemplate()}
67+
<Text variant="paragraph-600" numberOfLines={1}>
68+
{header}
69+
</Text>
70+
<IconLink icon="close" size="md" onPress={ModalController.close} testID="button-close" />
71+
</FlexView>
7472
);
7573
}

packages/scaffold/src/views/w3m-connect-view/components/all-wallet-list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function AllWalletList({ itemStyle, onWalletPress, isWalletConnectEnabled
4040
imageSrc={AssetUtil.getWalletImage(wallet)}
4141
imageHeaders={imageHeaders}
4242
name={wallet?.name ?? 'Unknown'}
43-
onPress={() => onWalletPress(wallet!)}
43+
onPress={() => onWalletPress(wallet)}
4444
style={itemStyle}
4545
installed={!!installed.find(installedWallet => installedWallet.id === wallet.id)}
4646
/>

packages/scaffold/src/views/w3m-connect-view/components/custom-wallet-list.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { filterOutRecentWallets } from '../utils';
1414
interface Props {
1515
itemStyle: StyleProp<ViewStyle>;
1616
onWalletPress: (wallet: CustomWallet) => void;
17-
list?: CustomWallet[];
1817
isWalletConnectEnabled: boolean;
1918
}
2019

packages/scaffold/src/views/w3m-connect-view/components/recent-wallet-list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function RecentWalletList({ itemStyle, onWalletPress, isWalletConnectEnab
3333
imageSrc={AssetUtil.getWalletImage(wallet)}
3434
imageHeaders={imageHeaders}
3535
name={wallet?.name ?? 'Unknown'}
36-
onPress={() => onWalletPress(wallet!, isInstalled)}
36+
onPress={() => onWalletPress(wallet, isInstalled)}
3737
tagLabel="Recent"
3838
tagVariant="shade"
3939
style={itemStyle}

packages/ui/src/composites/wui-input-numeric/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function InputNumeric({
2323
...props
2424
}: InputNumericProps) {
2525
const _onChangeText = (text: string) => {
26-
const isNumber = /^[0-9]*$/.test(text);
26+
const isNumber = /^\d*$/.test(text);
2727
if (isNumber) {
2828
onChangeText?.(text);
2929
}

packages/ui/src/composites/wui-otp/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function Otp({ length, style, onChangeText, autoFocus }: OtpProps) {
2525
);
2626

2727
const _onChangeText = (text: string, index: number) => {
28-
let newValue = [...value];
28+
let newValue;
2929

3030
if (text.length <= 1) {
3131
newValue = [...value.slice(0, index), text, ...value.slice(index + 1)];
@@ -41,7 +41,7 @@ export function Otp({ length, style, onChangeText, autoFocus }: OtpProps) {
4141
...value.slice(index + 1)
4242
];
4343
} else {
44-
newValue = [...value.slice(0, index), text[0] || '', ...value.slice(index + 1)];
44+
newValue = [...value.slice(0, index), text[0] ?? '', ...value.slice(index + 1)];
4545
focusInputField('next', index);
4646
}
4747

0 commit comments

Comments
 (0)