public static async Task <ApiResponse> AddNewAddressBookItem(string address, string label) { ApiResponse response = new ApiResponse(); try { AddressBook book = new AddressBook(); await book.AddNewAddressBookItem(address, label); } catch (ApiCustomException ex) { Logger.Singleton.Error(ex.ToString()); response.Error = new ApiError(ex.ErrorCode, ex.ToString()); } catch (Exception ex) { Logger.Singleton.Error(ex.ToString()); response.Error = new ApiError(ex.HResult, ex.ToString()); } return(response); }
public async Task AddNewAddressBookItem() { AddressBook book = new AddressBook(); await book.AddNewAddressBookItem("fiiitFmH9Cqk5B9gTH3LqZzBtqb8pxgHJ7sVqY", "testnet"); }