Skip to content

Commit 54afaed

Browse files
committed
fix ledger address choosing
1 parent f340542 commit 54afaed

File tree

5 files changed

+84
-57
lines changed

5 files changed

+84
-57
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### [0.16.1](https://github.com/xdevguild/buildo.dev/releases/tag/v0.16.1) (2025-04-06)
2+
- fix Ledger address choosing
3+
14
### [0.16.0](https://github.com/xdevguild/buildo.dev/releases/tag/v0.16.0) (2025-03-08)
25
- update dependencies
36
- adjust code

components/elven-ui/ledger-accounts-list.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ interface LedgerAccountsListProps {
1111
resetLoginMethod: () => void;
1212
handleLogin: (
1313
type: LoginMethodsEnum,
14-
ledgerAccountsIndex?: number
14+
ledgerAccountsIndex?: number,
15+
page?: number,
16+
pageSize?: number
1517
) => () => void;
1618
}
1719

@@ -108,9 +110,9 @@ export const LedgerAccountsList: FC<LedgerAccountsListProps> = ({
108110
}, [router]);
109111

110112
const login = useCallback(
111-
(index: number, address: string) => () => {
113+
(index: number, address: string, page: number, pageSize: number) => () => {
112114
setAddress(address);
113-
handleLogin(LoginMethodsEnum.ledger, index)();
115+
handleLogin(LoginMethodsEnum.ledger, index, page, pageSize)();
114116
},
115117
[handleLogin]
116118
);
@@ -162,7 +164,12 @@ export const LedgerAccountsList: FC<LedgerAccountsListProps> = ({
162164
<div
163165
key={account}
164166
className="hover:bg-accent mb-0.5 cursor-pointer rounded-md border border-solid p-2 transition duration-200 hover:border-dotted"
165-
onClick={login(index, account)}
167+
onClick={login(
168+
index,
169+
account,
170+
currentPage.current,
171+
ADDRESSES_PER_PAGE
172+
)}
166173
>
167174
<span className="inline-block min-w-4 text-center">
168175
{index + currentPage.current * ADDRESSES_PER_PAGE}

components/elven-ui/login-component.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,16 @@ export const LoginComponent = memo(() => {
2424
const [loginMethod, setLoginMethod] = useState<LoginMethodsEnum>();
2525

2626
const handleLogin = useCallback(
27-
(type: LoginMethodsEnum, ledgerAccountsIndex?: number) => () => {
28-
setLoginMethod(type);
29-
login(type, ledgerAccountsIndex);
30-
},
27+
(
28+
type: LoginMethodsEnum,
29+
ledgerAccountsIndex?: number,
30+
page?: number,
31+
pageSize?: number
32+
) =>
33+
() => {
34+
setLoginMethod(type);
35+
login(type, ledgerAccountsIndex, page, pageSize);
36+
},
3137
[login]
3238
);
3339

package-lock.json

Lines changed: 57 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "buildo.dev",
3-
"version": "0.16.0",
3+
"version": "0.16.1",
44
"author": "Julian Ćwirko <julian.io>",
55
"license": "MIT",
66
"homepage": "https://www.buildo.dev",
@@ -31,7 +31,7 @@
3131
"@radix-ui/react-separator": "1.1.2",
3232
"@radix-ui/react-slot": "1.1.2",
3333
"@radix-ui/react-tooltip": "1.1.8",
34-
"@useelven/core": "0.23.0",
34+
"@useelven/core": "0.23.1",
3535
"axios": "1.8.2",
3636
"bech32": "2.0.0",
3737
"bignumber.js": "9.1.2",
@@ -40,7 +40,7 @@
4040
"clsx": "2.1.1",
4141
"js-sha3": "0.9.3",
4242
"lucide-react": "0.479.0",
43-
"next": "15.2.1",
43+
"next": "15.2.3",
4444
"next-themes": "0.4.4",
4545
"qrcode": "1.5.4",
4646
"react": "19.0.0",

0 commit comments

Comments
 (0)