Skip to content

Commit

Permalink
chore: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
LHerskind committed Apr 17, 2024
1 parent bae0aa1 commit 804646b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions yarn-project/circuit-types/src/tx/simulated_tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class SimulatedTx {
*/
public toJSON() {
const returnToJson = (data: ProcessReturnValues | undefined): string => {
if (data == undefined) {
if (data === undefined) {
return JSON.stringify(data);
}
return JSON.stringify(data.map(fr => fr.toString()));
Expand All @@ -37,7 +37,7 @@ export class SimulatedTx {
*/
public static fromJSON(obj: any) {
const returnFromJson = (json: string): ProcessReturnValues | undefined => {
if (json == undefined) {
if (json === undefined) {
return json;
}
return JSON.parse(json).map(Fr.fromString);
Expand Down
1 change: 0 additions & 1 deletion yarn-project/pxe/src/pxe_service/pxe_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,6 @@ export class PXEService implements PXE {
}

if (simulatePublic) {
// Only one transaction, so we can take index 0.
simulatedTx.publicReturnValues = await this.#simulatePublicCalls(simulatedTx.tx);
}

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/types/src/abi/contract_artifact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function generateFunctionArtifact(fn: NoirCompiledContractFunction, contract: No
}

let returnTypes: AbiType[] = [];
if (functionType == FunctionType.UNCONSTRAINED && fn.abi.return_type) {
if (functionType === FunctionType.UNCONSTRAINED && fn.abi.return_type) {
returnTypes = [fn.abi.return_type.abi_type];
} else {
const pathToFind = `${contract.name}::${fn.name}_abi`;
Expand Down

0 comments on commit 804646b

Please sign in to comment.