private async Task <string> GetAddressAsync(bool isSegwit, uint coinNumber, bool isChange, uint index, bool display, string coinName = null, bool isPublicKey = false) { var addressPath = new BIP44AddressPath(isSegwit, coinNumber, 0, isChange, index); var firstAddress = await TrezorManager.GetAddressAsync(addressPath, isPublicKey, display); var addressPathString = $"m/{(isSegwit ? 49 : 44)}'/{coinNumber}'/{(isChange ? 1 : 0)}'/{0}/{index}"; var secondAddress = await GetAddressAsync(addressPathString); Assert.IsTrue(firstAddress == secondAddress, "The parsed version of the address path yielded a different result to the non-parsed version"); return(secondAddress); }
private static Task <string> GetAddressAsync(bool isSegwit, uint coinNumber, bool isChange, uint index, bool display, string coinName = null, bool isPublicKey = false) { var addressPath = new AddressPath(isSegwit, coinNumber, 0, isChange, index); return(TrezorManager.GetAddressAsync(addressPath, isPublicKey, display)); }