Skip to content

Commit f7a26ad

Browse files
committed
feat: only accounts required for custody
TICKET: BTC-2470
1 parent c15c011 commit f7a26ad

File tree

1 file changed

+9
-5
lines changed
  • modules/abstract-lightning/src/codecs/api

1 file changed

+9
-5
lines changed

modules/abstract-lightning/src/codecs/api/wallet.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,15 @@ export const WatchOnlyAccount = t.type({
5252

5353
export type WatchOnlyAccount = t.TypeOf<typeof WatchOnlyAccount>;
5454

55-
export const WatchOnly = t.type({
56-
master_key_birthday_timestamp: t.string,
57-
master_key_fingerprint: t.string,
58-
accounts: t.array(WatchOnlyAccount),
59-
});
55+
export const WatchOnly = t.intersection([
56+
t.type({
57+
accounts: t.array(WatchOnlyAccount),
58+
}),
59+
t.partial({
60+
master_key_birthday_timestamp: t.string,
61+
master_key_fingerprint: t.string,
62+
}),
63+
]);
6064

6165
export type WatchOnly = t.TypeOf<typeof WatchOnly>;
6266

0 commit comments

Comments
 (0)