fix: resolve type conflicts in AccountKeyInfo and KeyMeta imports
- Update AccountKeyInfo interface to handle derivationPath type conflict - Fix circular dependency by importing KeyMeta directly from interfaces/common - Use Omit utility type to properly merge Account and KeyMeta types - Make derivationPath optional in AccountKeyInfo to match Account type This change resolves type compatibility issues while maintaining the intended functionality of account metadata handling.
This commit is contained in:
@@ -37,7 +37,8 @@ import {
|
||||
retrieveFullyDecryptedAccount,
|
||||
getPasskeyExpirationSeconds,
|
||||
} from "../libs/util";
|
||||
import { createEndorserJwtForKey, KeyMeta } from "../libs/crypto/vc";
|
||||
import { createEndorserJwtForKey } from "../libs/crypto/vc";
|
||||
import { KeyMeta } from "../interfaces/common";
|
||||
|
||||
import {
|
||||
GenericCredWrapper,
|
||||
|
||||
@@ -43,7 +43,7 @@ import {
|
||||
import {
|
||||
OfferVerifiableCredential,
|
||||
} from "../interfaces/claims";
|
||||
import { KeyMeta } from "../libs/crypto/vc";
|
||||
import { KeyMeta } from "../interfaces/common";
|
||||
import { createPeerDid } from "../libs/crypto/vc/didPeer";
|
||||
import { registerCredential } from "../libs/crypto/vc/passkeyDidPeer";
|
||||
import { logger } from "../utils/logger";
|
||||
@@ -478,7 +478,9 @@ export function findAllVisibleToDids(
|
||||
*
|
||||
**/
|
||||
|
||||
export interface AccountKeyInfo extends Account, KeyMeta {}
|
||||
export interface AccountKeyInfo extends Omit<Account, 'derivationPath'>, Omit<KeyMeta, 'derivationPath'> {
|
||||
derivationPath?: string; // Make it optional to match Account type
|
||||
}
|
||||
|
||||
export const retrieveAccountCount = async (): Promise<number> => {
|
||||
let result = 0;
|
||||
|
||||
Reference in New Issue
Block a user