From 312157018d28851e063215fc925234e9e51b110e Mon Sep 17 00:00:00 2001 From: Jack Hamer Date: Sun, 8 Dec 2024 16:05:56 +0200 Subject: [PATCH] fix: incorrect refValue formatting --- .github/workflows/deploy-package-temp.yml | 43 +++++++++++++++++++ packages/contracts | 2 +- .../src/client-auth-server/session/utils.ts | 2 +- 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/deploy-package-temp.yml diff --git a/.github/workflows/deploy-package-temp.yml b/.github/workflows/deploy-package-temp.yml new file mode 100644 index 0000000..b42690e --- /dev/null +++ b/.github/workflows/deploy-package-temp.yml @@ -0,0 +1,43 @@ +name: Deploy NPM Package + +on: + pull_request: + paths: + - "packages/sdk/**" + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 9.11.0 + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: lts/Iron + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install -r --frozen-lockfile + + - name: Build the package + run: pnpm nx build sdk + + - name: Prepare package.json + working-directory: packages/sdk + run: node prepare-package.mjs + env: + INPUT_VERSION: 0.0.0-beta.6 + + - name: Create .npmrc + run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPMJS_NPM_MATTERLABS_AUTOMATION_TOKEN }}" > ~/.npmrc + + - name: Publish to NPM + working-directory: packages/sdk + run: npm publish --access public \ No newline at end of file diff --git a/packages/contracts b/packages/contracts index 64bfff1..c1d2dcf 160000 --- a/packages/contracts +++ b/packages/contracts @@ -1 +1 @@ -Subproject commit 64bfff1f28cc502a8a482a7cb6ed4afa401bf338 +Subproject commit c1d2dcf8636958fd4f9c7d058bb0f4850958b600 diff --git a/packages/sdk/src/client-auth-server/session/utils.ts b/packages/sdk/src/client-auth-server/session/utils.ts index 36fe255..199190e 100644 --- a/packages/sdk/src/client-auth-server/session/utils.ts +++ b/packages/sdk/src/client-auth-server/session/utils.ts @@ -33,7 +33,7 @@ export const encodedInputToAbiChunks = (encodedInput: string) => { if (!encodedInput.startsWith("0x")) { throw new Error("Input is not a valid hex string"); } - return (encodedInput.slice(2).match(/.{1,64}/g) || []) as Hash[]; // 32 bytes abi chunks + return (encodedInput.slice(2).match(/.{1,64}/g) || []).map((e) => `0x${e}`) as Hash[]; // 32 bytes abi chunks }; const getDummyBytesValue = (type: string) => {