diff --git a/src/common/hook/useQueue/useQueue.tsx b/src/common/hook/useQueue/useQueue.tsx index 860cdab2..185419bf 100644 --- a/src/common/hook/useQueue/useQueue.tsx +++ b/src/common/hook/useQueue/useQueue.tsx @@ -62,7 +62,9 @@ export const useQueue = ({ const completedJobsIndexes: number[] = []; const failedJobs: FailedJob[] = []; setQueueState(QueueState.INITIALIZED); + const wallet = config.wallet; + console.log(wallet); try { const nonce = await config.wallet.getTransactionCount(); const processingJobs = @@ -89,6 +91,7 @@ export const useQueue = ({ completedJobsIndexes.push(index); setCompletedJobIndex(completedJobsIndexes); } else if (queueType === QueueType.REVOKE) { + console.log(job); await revokeDocumentJob(job as RevokingJob, wallet); completedJobsIndexes.push(index); setCompletedJobIndex(completedJobsIndexes); diff --git a/src/common/hook/useQueue/utils/revoke.tsx b/src/common/hook/useQueue/utils/revoke.tsx index 170ea80e..afb7dc21 100644 --- a/src/common/hook/useQueue/utils/revoke.tsx +++ b/src/common/hook/useQueue/utils/revoke.tsx @@ -19,12 +19,19 @@ export const getRevokeAddress = (document: any) => { const unwrappedDocument = utils.getData(document); const issuer = unwrappedDocument.issuers[0]; revokeAddress = issuer.revocation?.location || ""; + console.log(`1revokeAddress, ${revokeAddress}`); } else if (utils.isWrappedV3Document(document)) { + console.log(`document2, ${JSON.stringify(document)}`); revokeAddress = document.openAttestationMetadata.proof.revocation?.location || ""; + revokeAddress = document.openAttestationMetadata.proof.revocation?.location || ""; + console.log(`2revokeAddress, ${revokeAddress}`); } // for dns-txt document with document store if (!revokeAddress) { revokeAddress = utils.getIssuerAddress(document)[0]; + + revokeAddress = revokeAddress || document.openAttestationMetadata.proof.value || ""; + console.log(`3revokeAddress, ${revokeAddress}`); } return revokeAddress; diff --git a/src/components/Home/WalletDecryption/WalletDecryptionContainer.tsx b/src/components/Home/WalletDecryption/WalletDecryptionContainer.tsx index ab43428c..7ea781eb 100644 --- a/src/components/Home/WalletDecryption/WalletDecryptionContainer.tsx +++ b/src/components/Home/WalletDecryption/WalletDecryptionContainer.tsx @@ -18,6 +18,8 @@ export const WalletDecryptionContainer: FunctionComponent = () => { }; const onDecryptConfigFile = async (password: string): Promise => { + console.log(JSON.stringify(configFile)); + console.log(JSON.stringify(configFile?.network)); if (!configFile) return; try { setIsIncorrectPassword(false); diff --git a/src/services/revoking/revoking.ts b/src/services/revoking/revoking.ts index cbe835f8..ed62d7b2 100644 --- a/src/services/revoking/revoking.ts +++ b/src/services/revoking/revoking.ts @@ -4,6 +4,8 @@ import { assertAddressIsSmartContract, getConnectedDocumentStore } from "../comm export const revokeDocumentJob = async (job: RevokingJob, account: Wallet | ConnectedSigner): Promise => { const { contractAddress, targetHash } = job; + console.log(contractAddress); + console.log(targetHash); await assertAddressIsSmartContract(contractAddress, account); const documentStore = await getConnectedDocumentStore(account, contractAddress); const receipt = await documentStore.revoke(`0x${targetHash}`);