getRipplePathFound method
Future<RipplePathFound>
getRipplePathFound({
- required String sourceAccount,
- required String destinationAccount,
- required CurrencyAmount destinationAmount,
- CurrencyAmount? sendMax,
- List<
XRPCurrencies> ? currencies,
Implementation
Future<RipplePathFound> getRipplePathFound(
{required String sourceAccount,
required String destinationAccount,
required CurrencyAmount destinationAmount,
CurrencyAmount? sendMax,
List<XRPCurrencies>? currencies}) async {
final Map<String, dynamic> configParams = {
"source_account": sourceAccount,
"destination_account": destinationAccount,
"destination_amount": destinationAmount.toJson(),
};
createRpcConfig(configParams, "send_max", sendMax?.toJson());
createRpcConfig(configParams, "source_currencies",
currencies?.map((e) => e.toJson()).toList());
final response = await makeCustomCall<Map<String, dynamic>>(
"ripple_path_find", [configParams]);
print("response $response");
// return AccountInfo.fromJson(response);
return RipplePathFound.fromJson(response);
}