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,
|
retrieveFullyDecryptedAccount,
|
||||||
getPasskeyExpirationSeconds,
|
getPasskeyExpirationSeconds,
|
||||||
} from "../libs/util";
|
} from "../libs/util";
|
||||||
import { createEndorserJwtForKey, KeyMeta } from "../libs/crypto/vc";
|
import { createEndorserJwtForKey } from "../libs/crypto/vc";
|
||||||
|
import { KeyMeta } from "../interfaces/common";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
GenericCredWrapper,
|
GenericCredWrapper,
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
OfferVerifiableCredential,
|
OfferVerifiableCredential,
|
||||||
} from "../interfaces/claims";
|
} from "../interfaces/claims";
|
||||||
import { KeyMeta } from "../libs/crypto/vc";
|
import { KeyMeta } from "../interfaces/common";
|
||||||
import { createPeerDid } from "../libs/crypto/vc/didPeer";
|
import { createPeerDid } from "../libs/crypto/vc/didPeer";
|
||||||
import { registerCredential } from "../libs/crypto/vc/passkeyDidPeer";
|
import { registerCredential } from "../libs/crypto/vc/passkeyDidPeer";
|
||||||
import { logger } from "../utils/logger";
|
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> => {
|
export const retrieveAccountCount = async (): Promise<number> => {
|
||||||
let result = 0;
|
let result = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user