From 5129df07b389735b604421c74decbadec1f81865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renaud?= Date: Wed, 15 Oct 2025 17:33:32 +0200 Subject: [PATCH 1/2] build step --- .github/workflows/test.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c080b24..87089c9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,6 +2,9 @@ name: Test on: pull_request: + push: + branches: + - "main" jobs: run-tests: @@ -33,4 +36,7 @@ jobs: run: yarn install --frozen-lockfile - name: Run tests - run: yarn test \ No newline at end of file + run: yarn test + + - name: Build + run: yarn build \ No newline at end of file From 5401fc9d9e41263f55aafe562b6c4aa409ead529 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renaud?= Date: Wed, 15 Oct 2025 17:34:10 +0200 Subject: [PATCH 2/2] fix types --- src/execution.test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/execution.test.ts b/src/execution.test.ts index 8d42548..d88f9a6 100644 --- a/src/execution.test.ts +++ b/src/execution.test.ts @@ -36,11 +36,11 @@ const actions = [ describe("execution", () => { it("should encode and decode MINT action correctly", () => { const action = actions[0]; - const encoded = encodeAction(action); + const encoded = encodeAction(action as any); const decoded = decodeAction(encoded); expect(decoded.type).toBe(ActionType.MINT); - expect(decoded.data.hubToAddress).toBe(action.data.hubToAddress); + expect("hubToAddress" in decoded.data && decoded.data.hubToAddress).toBe(action.data.hubToAddress); expect(decoded.data.hubTokenId).toBe(action.data.hubTokenId); expect(decoded.data.amount).toBe(action.data.amount); }); @@ -50,7 +50,7 @@ describe("execution", () => { const encoded = encodeAction(action as any); const decoded = decodeAction(encoded); expect(decoded.type).toBe(ActionType.BURN); - expect(decoded.data.hubFromAddress).toBe(action.data.hubFromAddress); + expect("hubFromAddress" in decoded.data && decoded.data.hubFromAddress).toBe(action.data.hubFromAddress); expect(decoded.data.hubTokenId).toBe(action.data.hubTokenId); expect(decoded.data.amount).toBe(action.data.amount); }); @@ -60,8 +60,8 @@ describe("execution", () => { const encoded = encodeAction(action as any); const decoded = decodeAction(encoded); expect(decoded.type).toBe(ActionType.TRANSFER); - expect(decoded.data.hubFromAddress).toBe(action.data.hubFromAddress); - expect(decoded.data.hubToAddress).toBe(action.data.hubToAddress); + expect("hubFromAddress" in decoded.data && decoded.data.hubFromAddress).toBe(action.data.hubFromAddress); + expect("hubToAddress" in decoded.data && decoded.data.hubToAddress).toBe(action.data.hubToAddress); expect(decoded.data.hubTokenId).toBe(action.data.hubTokenId); expect(decoded.data.amount).toBe(action.data.amount); });