Skip to content

Commit

Permalink
fix: Resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
alainncls committed Oct 23, 2023
1 parent 67bae81 commit 50c56c6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
2 changes: 0 additions & 2 deletions sdk/src/dataMapper/AttestationDataMapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ export default class AttestationDataMapper extends BaseDataMapper<
return await this.executeReadMethod("balanceOfBatch", [accounts, ids]);
}

// TODO: Use correct type for args
private async executeReadMethod(functionName: string, args: unknown[]) {
return await this.web3Client.readContract({
abi: abiAttestationRegistry,
Expand All @@ -122,7 +121,6 @@ export default class AttestationDataMapper extends BaseDataMapper<
});
}

// TODO: Use correct type for args
private async simulateContract(functionName: string, args: unknown[]) {
try {
const { request } = await this.web3Client.simulateContract({
Expand Down
23 changes: 1 addition & 22 deletions sdk/src/dataMapper/PortalDataMapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,6 @@ export default class PortalDataMapper extends BaseDataMapper<Portal, Portal_filt
return await this.executeTransaction(request);
}

async register() {
throw new Error("Not implemented");
}

async clone() {
throw new Error("Not implemented");
}

// TODO: Use correct type for args
private async simulateContract(portalAddress: Address, functionName: string, args: unknown[]) {
try {
const { request } = await this.web3Client.simulateContract({
Expand All @@ -168,11 +159,6 @@ export default class PortalDataMapper extends BaseDataMapper<Portal, Portal_filt
}
}

async bulkRevoke(portalAddress: Address, attestationIds: string[]) {
const request = await this.simulateBulkRevoke(portalAddress, attestationIds);
return await this.executeTransaction(request);
}

async simulateRegister(id: Address, name: string, description: string, isRevocable: boolean, ownerName: string) {
return this.simulatePortalRegistryContract("register", [id, name, description, isRevocable, ownerName]);
}
Expand Down Expand Up @@ -238,17 +224,10 @@ export default class PortalDataMapper extends BaseDataMapper<Portal, Portal_filt

return request;
} catch (err) {
this.handleError(err);
handleError(err);
}
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
private async executeTransaction(request: any) {
const hash: Hash = await this.walletClient.writeContract(request);
console.log(`Transaction sent with hash ${hash}`);
return hash;
}

// TODO: Use correct type for request
// eslint-disable-next-line @typescript-eslint/no-explicit-any
private async executeTransaction(request: any) {
Expand Down

0 comments on commit 50c56c6

Please sign in to comment.