Skip to content

Commit

Permalink
feat: replace t.any with Sensitive type
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszjasiuk committed Feb 29, 2024
1 parent 55a1d72 commit 7b3b0ee
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions apps/extension/src/storage/VaultStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,27 @@ export const KeyStore = t.exact(
);
export type KeyStoreType = t.TypeOf<typeof KeyStore>;

const Vault = t.type({
//TODO: any for time being
password: t.any,
data: t.record(
t.string,
t.array(
t.intersection([
t.type({
public: KeyStore,
}),
t.partial({
sensitive: Sensitive,
}),
])
)
),
});
const Vault = t.intersection([
t.type({
data: t.record(
t.string,
t.array(
t.intersection([
t.type({
public: KeyStore,
}),
t.partial({
sensitive: Sensitive,
}),
])
)
),
}),
t.partial({
password: Sensitive,
}),
]);

type VaultType = t.TypeOf<typeof Vault>;

export type VaultTypes = KeyStoreType;
Expand Down

0 comments on commit 7b3b0ee

Please sign in to comment.