readLimits method

Future<void> readLimits()

Implementation

Future<void> readLimits() async {
  limitsState.loading();
  await UServices.gold.readTradeLimits(
    onOk: (UResponse<UGoldTradeLimitsResponse> r) => limits.value = r.result,
    onError: (UEmptyResponse e) {},
    onException: (String e) {},
  );
  await UServices.gold.readCreditFacilities(
    onOk: (UResponse<UGoldCreditFacilitiesResponse> r) {
      credit.value = r.result;
      limitsState.loaded();
    },
    onError: (UEmptyResponse e) => limitsState.error(),
    onException: (String e) => limitsState.error(),
  );
}