problem: cannot verify signature in browser

solution: support NIST P-256 curve which is supported by browser's webcrypto
This commit is contained in:
Vyacheslav Shebanov
2022-06-17 05:08:18 +03:00
committed by GitHub
parent aeea27bb70
commit de5720897a
8 changed files with 73 additions and 21 deletions

View File

@@ -1,13 +1,25 @@
package testing
import com.fasterxml.jackson.databind.ObjectMapper
class CommonHandlers implements CallHandler {
ObjectMapper objectMapper
ResourceResponse resourceResponse
CommonHandlers(ObjectMapper objectMapper) {
this.objectMapper = objectMapper
this.resourceResponse = new ResourceResponse(objectMapper)
}
@Override
Result handle(String method, List<Object> params) {
if (method == "eth_syncing") {
return Result.ok(false)
}
if (method == "eth_chainId") {
return resourceResponse.respondWith("chain-id.json")
}
return null
}
}

View File

@@ -17,7 +17,7 @@ class SimpleUpstream {
internalHandler = new InternalHandler()
handlers << new TestcaseHandler(objectMapper)
handlers << new CommonHandlers()
handlers << new CommonHandlers(objectMapper)
handlers << new BlocksHandler(objectMapper)
handlers << new PingPongHandler()
handlers << internalHandler