sign hardcoded requests
This commit is contained in:
@@ -218,7 +218,11 @@ open class NativeCall(
|
|||||||
api.read(JsonRpcRequest(ctx.payload.method, ctx.payload.params, ctx.nonce))
|
api.read(JsonRpcRequest(ctx.payload.method, ctx.payload.params, ctx.nonce))
|
||||||
.flatMap(JsonRpcResponse::requireResult)
|
.flatMap(JsonRpcResponse::requireResult)
|
||||||
.map {
|
.map {
|
||||||
CallResult.ok(ctx.id, ctx.nonce, it, null)
|
if (ctx.nonce != null) {
|
||||||
|
CallResult.ok(ctx.id, ctx.nonce, it, signer.sign(ctx.nonce, it, ctx.upstream))
|
||||||
|
} else {
|
||||||
|
CallResult.ok(ctx.id, null, it, null)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}.switchIfEmpty(
|
}.switchIfEmpty(
|
||||||
Mono.just(ctx).flatMap(this::executeOnRemote)
|
Mono.just(ctx).flatMap(this::executeOnRemote)
|
||||||
|
|||||||
Reference in New Issue
Block a user