problem: cannot verify signature in browser
solution: support NIST P-256 curve which is supported by browser's webcrypto
This commit is contained in:
committed by
GitHub
parent
aeea27bb70
commit
de5720897a
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user