diff --git a/src/txFactory/credentialRegistryTransactionFactory.ts b/src/txFactory/credentialRegistryTransactionFactory.ts index 93df498..8184617 100644 --- a/src/txFactory/credentialRegistryTransactionFactory.ts +++ b/src/txFactory/credentialRegistryTransactionFactory.ts @@ -121,7 +121,7 @@ export function updateCredentialStatus(web3, issuerCredentialHash, status) { } /** - * function updateIssuerCredentialStatus(web3, issuerCredentialHash, status) + * function updateIssuerCredential(web3, issuerCredentialHash, status) * @param web3 ethereum connection * @param issuerCredentialHash should have 32 bytes * @param status uint that indicates the status of the credential diff --git a/src/txFactory/publicKeyRegistryTransactionFactory.ts b/src/txFactory/publicKeyRegistryTransactionFactory.ts index 4c93f0f..91bd28e 100644 --- a/src/txFactory/publicKeyRegistryTransactionFactory.ts +++ b/src/txFactory/publicKeyRegistryTransactionFactory.ts @@ -125,32 +125,13 @@ export function getCurrentPublicKey(web3, did) { return transaction } -/** - * TODO: ELIMINAR??? - * THIS METHOD WILL BE DEPREATED, USE INSTEAD getPublicKeyStatusHash - * function getPublicKeyStatus(address subject, bytes32 publicKeyHash) view public - * @param did ethereum connection - * @param publicKey the public key. - */ -export function getPublicKeyStatus(web3, did, publicKey) { - const subjectAddr = AIdUtils.getProxyAddress(did) - const transaction = Object.assign({}, config.basicTransaction) - transaction.data = web3.eth.abi.encodeFunctionCall( - config.contractsAbi.AlastriaPublicKeyRegistry.getPublicKeyStatus, - [subjectAddr, AddressUtils.getAddressWithoutHexPrefix(publicKey)] - ) - transaction.to = config.alastriaPublicKeyRegistry - transaction.gasLimit = 600000 - return transaction -} - /** * function getPublicKeyStatus(address subject, bytes32 publicKeyHash) view public * @param web3 ethereum connection * @param did alastri Id * @param publicKeyHash the hash of the publickey. should have 32 bytes */ -export function getPublicKeyStatusHash(web3, did, publicKeyHash) { +export function getPublicKeyStatus(web3, did, publicKeyHash) { const subjectAddr = AIdUtils.getProxyAddress(did) const transaction = Object.assign({}, config.basicTransaction) transaction.data = web3.eth.abi.encodeFunctionCall( diff --git a/src/txFactory/transactionFactory.ts b/src/txFactory/transactionFactory.ts index a86c248..a87c517 100644 --- a/src/txFactory/transactionFactory.ts +++ b/src/txFactory/transactionFactory.ts @@ -54,7 +54,6 @@ import { deletePublicKeyHash, getCurrentPublicKey, getPublicKeyStatus, - getPublicKeyStatusHash, } from './publicKeyRegistryTransactionFactory' export const transactionFactory = { @@ -109,7 +108,6 @@ export const transactionFactory = { deletePublicKey: deletePublicKey, deletePublicKeyHash: deletePublicKeyHash, getCurrentPublicKey: getCurrentPublicKey, - getPublicKeyStatus: getPublicKeyStatus, - getPublicKeyStatusHash: getPublicKeyStatusHash, + getPublicKeyStatus: getPublicKeyStatus } }