Skip to content

Commit

Permalink
remove unused function and rename credentialRegistryTransactionFactor…
Browse files Browse the repository at this point in the history
…y function
  • Loading branch information
rober12 committed Nov 11, 2024
1 parent e43c9b4 commit fdeaba7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/txFactory/credentialRegistryTransactionFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 1 addition & 20 deletions src/txFactory/publicKeyRegistryTransactionFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 1 addition & 3 deletions src/txFactory/transactionFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ import {
deletePublicKeyHash,
getCurrentPublicKey,
getPublicKeyStatus,
getPublicKeyStatusHash,
} from './publicKeyRegistryTransactionFactory'

export const transactionFactory = {
Expand Down Expand Up @@ -109,7 +108,6 @@ export const transactionFactory = {
deletePublicKey: deletePublicKey,
deletePublicKeyHash: deletePublicKeyHash,
getCurrentPublicKey: getCurrentPublicKey,
getPublicKeyStatus: getPublicKeyStatus,
getPublicKeyStatusHash: getPublicKeyStatusHash,
getPublicKeyStatus: getPublicKeyStatus
}
}

0 comments on commit fdeaba7

Please sign in to comment.