From 59038b479fe6ce5590be4ca6abb167c6d8567857 Mon Sep 17 00:00:00 2001 From: Gusarich Date: Wed, 10 Apr 2024 13:11:18 +0300 Subject: [PATCH] fix formatting --- src/test/feature-constants.spec.ts | 8 ++++++-- src/types/resolveConstantValue.ts | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/test/feature-constants.spec.ts b/src/test/feature-constants.spec.ts index d77ed7a4e..b1f36a084 100644 --- a/src/test/feature-constants.spec.ts +++ b/src/test/feature-constants.spec.ts @@ -24,8 +24,12 @@ describe("feature-constants", () => { expect(await contract.getSomething6()).toEqual(10n); expect(await contract.getSomething7()).toEqual(5n); expect(await contract.getSomething8()).toEqual(4n); - expect((await contract.getSomething9()).toRawString()).toEqual("0:4a81708d2cf7b15a1b362fbf64880451d698461f52f05f145b36c08517d76873"); - expect((await contract.getSomething10()).toRawString()).toEqual("0:4a81708d2cf7b15a1b362fbf64880451d698461f52f05f145b36c08517d76873"); + expect((await contract.getSomething9()).toRawString()).toEqual( + "0:4a81708d2cf7b15a1b362fbf64880451d698461f52f05f145b36c08517d76873", + ); + expect((await contract.getSomething10()).toRawString()).toEqual( + "0:4a81708d2cf7b15a1b362fbf64880451d698461f52f05f145b36c08517d76873", + ); expect(await contract.getGlobalConst()).toEqual(100n); }); }); diff --git a/src/types/resolveConstantValue.ts b/src/types/resolveConstantValue.ts index 2f153b66c..0d042a94c 100644 --- a/src/types/resolveConstantValue.ts +++ b/src/types/resolveConstantValue.ts @@ -121,10 +121,13 @@ function reduceAddress(ast: ASTExpression, ctx: CompilerContext): Address { } return address; } - } else if (ast.name === 'newAddress') { + } else if (ast.name === "newAddress") { if (ast.args.length === 2) { const wc = reduceInt(ast.args[0]); - const addr = Buffer.from(reduceInt(ast.args[1]).toString(16), 'hex'); + const addr = Buffer.from( + reduceInt(ast.args[1]).toString(16), + "hex", + ); if (!enabledMasterchain(ctx)) { if (wc !== 0n) { throwError(