Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: challenge validation #88

Merged
merged 3 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions code/webauthn/contracts/contracts/Account.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion content/tutorials/erc20-paymaster/10.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down
2 changes: 1 addition & 1 deletion tests/configs/daily-spend-limit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion tests/configs/erc20-paymaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Loading