From 43e43096ccca9cbb58412b545d9165e951f6b257 Mon Sep 17 00:00:00 2001 From: Sarah Schwartz <58856580+sarahschwartz@users.noreply.github.com> Date: Mon, 30 Sep 2024 11:29:36 -0600 Subject: [PATCH 1/3] fix: challenge validation --- code/webauthn/contracts/contracts/Account.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/webauthn/contracts/contracts/Account.sol b/code/webauthn/contracts/contracts/Account.sol index b3dedff..7008b56 100644 --- a/code/webauthn/contracts/contracts/Account.sol +++ b/code/webauthn/contracts/contracts/Account.sol @@ -284,7 +284,7 @@ contract Account is IAccount, IERC1271 { // ANCHOR_END: callVerifier function extractChallengeFromClientData(bytes memory clientDataJSON) public pure returns (string memory) { - bytes memory challengeSlice = slice(clientDataJSON, 36, 58); + bytes memory challengeSlice = slice(clientDataJSON, 36, 88); string memory challenge = string(challengeSlice); return challenge; } @@ -319,7 +319,7 @@ contract Account is IAccount, IERC1271 { if (base64Bytes[i] == '/') base64Bytes[i] = '_'; } - return string(slice(base64Bytes, 0, 58)); + return string(base64Bytes); } fallback() external { From 8f6dea3bb8978db426dcf0e89159a5ebf994ab07 Mon Sep 17 00:00:00 2001 From: Sarah Schwartz <58856580+sarahschwartz@users.noreply.github.com> Date: Mon, 30 Sep 2024 11:48:06 -0600 Subject: [PATCH 2/3] fix: test prompt --- tests/configs/daily-spend-limit.ts | 2 +- tests/configs/erc20-paymaster.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/configs/daily-spend-limit.ts b/tests/configs/daily-spend-limit.ts index 8f42cc2..2419d7e 100644 --- a/tests/configs/daily-spend-limit.ts +++ b/tests/configs/daily-spend-limit.ts @@ -3,7 +3,7 @@ import type { IStepConfig } from '../utils/types'; export const steps: IStepConfig = { 'initialize-project': { action: 'runCommand', - prompts: 'Private key of the wallet: |npm: ', + prompts: 'Private key of the wallet: |❯ npm: ', }, 'wait-for-init': { action: 'wait', diff --git a/tests/configs/erc20-paymaster.ts b/tests/configs/erc20-paymaster.ts index f070a87..5a3ebf8 100644 --- a/tests/configs/erc20-paymaster.ts +++ b/tests/configs/erc20-paymaster.ts @@ -3,7 +3,7 @@ import type { IStepConfig } from '../utils/types'; export const steps: IStepConfig = { 'initialize-hardhat-project': { action: 'runCommand', - prompts: 'Private key of the wallet:0x7726827caac94a7f9e1b160f7ea819f172f7b6f9d2a97f992c38edeab82d4110|npm: ', + prompts: 'Private key of the wallet:0x7726827caac94a7f9e1b160f7ea819f172f7b6f9d2a97f992c38edeab82d4110|❯ npm: ', }, 'wait-for-init': { action: 'wait', From 337e216b444b312d2bd83a96e350a450d6a6b6bf Mon Sep 17 00:00:00 2001 From: Sarah Schwartz <58856580+sarahschwartz@users.noreply.github.com> Date: Mon, 30 Sep 2024 12:02:53 -0600 Subject: [PATCH 3/3] fix: remove force --- content/tutorials/erc20-paymaster/10.index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/tutorials/erc20-paymaster/10.index.md b/content/tutorials/erc20-paymaster/10.index.md index c40dbb2..db7b5ed 100644 --- a/content/tutorials/erc20-paymaster/10.index.md +++ b/content/tutorials/erc20-paymaster/10.index.md @@ -54,7 +54,7 @@ Next, navigate into the project directory and install the dependencies: :test-action{actionId="npm-install"} ```sh -cd custom-paymaster-tutorial && npm install --force +cd custom-paymaster-tutorial && npm install ``` :test-action{actionId="wait-for-install"}