onPayload method

  1. @override
void onPayload(
  1. dynamic payload
)
override

Implementation

@override
void onPayload(dynamic payload) {
  events.emit("payload", payload);
  if (isJsonRpcResponse(payload)) {
    events.emit(payload['id'].toString(), payload);
  } else {
    events.emit(
        "message",
        JsonRpcProviderMessage(
          type: payload['method'],
          data: payload['params'],
        ));
  }
}