public static async Task <bool> VASPIsRegisteredAsync( this IVASPIndexClient vaspIndex, VASPCode vaspCode, ConfirmationLevel minimalConfirmationLevel = default) { var vaspContractAddress = await vaspIndex.GetVASPContractAddressAsync(vaspCode, minimalConfirmationLevel); return(!Address.IsEmpty(vaspContractAddress)); }
public static async Task <(bool VASPIsRegistered, VASPCode VASPCode)> TryGetVASPCodeAsync( this IVASPIndexClient vaspIndex, Address vaspContractAddress, ConfirmationLevel minimalConfirmationLevel = default) { var vaspCode = await vaspIndex.GetVASPCodeAsync(vaspContractAddress, minimalConfirmationLevel); var vaspIsRegistered = !VASPCode.IsEmpty(vaspCode); return(vaspIsRegistered, vaspCode); }
// ReSharper disable once InconsistentNaming private async Task ICallVASPIsRegisteredAsyncMethodOfVASPIndexClient( IVASPIndexClient vaspIndexClient, Address vaspContractAddress, int minimalConfirmationLevel) { var callResult = await vaspIndexClient.VASPIsRegisteredAsync ( vaspContractAddress : _scenarioContext.GetRealContractAddress(vaspContractAddress), minimalConfirmationLevel : new ConfirmationLevel(minimalConfirmationLevel) ); _scenarioContext.SetCallResult(callResult); }
// ReSharper disable once InconsistentNaming private async Task ICallVASPIsRegisteredAsyncMethodOfVASPIndexClient( IVASPIndexClient vaspIndexClient, VASPCode vaspCode, int minimalConfirmationLevel) { var callResult = await vaspIndexClient.VASPIsRegisteredAsync ( vaspCode : vaspCode, minimalConfirmationLevel : new ConfirmationLevel(minimalConfirmationLevel) ); _scenarioContext.SetCallResult(callResult); }