Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.

Commit d7a2901

Browse files
committed
fix: compile errors
1 parent 9951bbb commit d7a2901

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ program.parse();
7272
accountWithSigner
7373
.filter((x) => !x.privateKey)
7474
.forEach((x) => {
75-
const signer = defaultSigners.find((y) =>
76-
equalSigner(x.signer, y.signer)
75+
const signer = defaultSigners.find(
76+
(y) => x.signer && equalSigner(x.signer, y.signer)
7777
);
7878
if (signer) {
7979
x.privateKey = signer.privateKey;

issues/oldHashAlgo/detect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ import { Account } from "../../ui/pickAccounts";
33

44
export const detect = async (accounts: Account[]): Promise<string[]> => {
55
return accounts
6-
.filter(({ version }) => lt(version, "0.2.1"))
6+
.filter(({ version }) => version && lt(version, "0.2.1"))
77
.map(({ address }) => address);
88
};

ui/pickAccounts.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ import { formatTokenBalanceShort } from "../tokenFormatting";
55
export interface BaseAccount {
66
address: string;
77
networkId: string;
8-
signer: string;
9-
version: string;
8+
signer: string | null;
9+
version: string | null;
1010
privateKey?: string;
1111
derivationPath?: string;
1212
}
1313

1414
export interface Account extends BaseAccount {
1515
balances: { [token: string]: string };
16-
implementation: string;
16+
implementation: string | null;
1717
}
1818

1919
interface PickAccountsOptions {
@@ -46,11 +46,12 @@ export async function pickAccounts(
4646
formatTokenBalanceShort(account.balances, network)
4747
).filter(([, balance]) => balance !== "0.0");
4848
return {
49-
title: `${truncateAddress(account.address)} (Signer: ${truncateHex(
50-
account.signer
51-
)}, Implementation: ${truncateAddress(account.implementation)}${
52-
balances.length ? ", " : ""
53-
}${balances
49+
title: `${truncateAddress(account.address)} (${
50+
account.signer && `Signer: ${truncateHex(account.signer)}, `
51+
}${
52+
account.implementation &&
53+
`Implementation: ${truncateAddress(account.implementation)}`
54+
}${balances.length ? ", " : ""}${balances
5455
.map(([token, balance]) => `${balance} ${token}`)
5556
.join(", ")})`,
5657
value: account.address,

0 commit comments

Comments
 (0)