getExchangeUrl method

  1. @override
Future<JsonRpcResponse> getExchangeUrl({
  1. required GetExchangeUrlParams params,
})
override

Implementation

@override
Future<JsonRpcResponse> getExchangeUrl({
  required GetExchangeUrlParams params,
}) async {
  final rpcRequest = JsonRpcRequest(
    id: JsonRpcUtils.payloadId(),
    method: 'reown_getExchangePayUrl',
    params: params.toParams(),
  );
  core.logger.d(
    '[$runtimeType] getExchangePayUrl ${jsonEncode(rpcRequest.toJson())}',
  );

  // await Future.delayed(Duration(seconds: 1));
  // return JsonRpcResponse.fromJson(_getExchangeUrlMockResponse);

  try {
    return await _request(rpcRequest);
  } catch (e) {
    rethrow;
  }
}