Giter Site home page Giter Site logo

ln-zap / zap-ios Goto Github PK

View Code? Open in Web Editor NEW
181.0 16.0 47.0 32.59 MB

Zap Wallet - Native iOS lightning wallet focused on user experience and ease of use ⚡️

Home Page: http://zaphq.io

License: MIT License

Swift 98.93% Objective-C 0.14% Ruby 0.53% Shell 0.26% Python 0.15%
zapwallet

zap-ios's Introduction

UNMAINTAINED

Zap iOS is not actively maintained at the moment. If you're looking for a simple way to make lightning transactions take a look at Strike.

Build Status GitHub license Crowdin codecov

Zap iOS

screenshot

Zap is a free Lightning Network wallet focused on user experience and ease of use, with the overall goal of helping the cryptocurrency community scale Bitcoin.

We have an active slack channel where you can join the discussion on development, design and product.

Features

Wallet

  • Fiat currency prices
  • Support for Bech32 and P2SH addresses
  • BTC, mBTC, bit & Satoshi units
  • Open lightning: & bitcoin: urls
  • Available in many languages
  • Resend failed lightning transactions
  • Transaction filter
  • BIP39 passphrase

Security

  • PIN protected access
  • Certificate pinning

Lightning

  • Channel Management
  • Connect to remote Lnd node
  • Connect to BTCPay Server
  • Connect to Zapconnect QR code
  • Run lnd on your iPhone

Security

If you discover or learn about a potential error, weakness, or threat that can compromise the security of Zap, we ask you to keep it confidential and submit your concern directly to the Zap security team.

Get Help

If you are having problems with Zap, please report the issue in GitHub or on slack with screenshots and/or how to reproduce the bug/error.

A good product not only has good software tests but also checks the quality of the UX/UI. Putting ourselves in the shoes of a user is a very important design principle of Zap.

Contribute

Hey! Do you like Zap? Awesome! We could actually really use your help!

Open source isn't just writing code. Zap could use your help with any of the following:

  • Finding (and reporting!) bugs
  • Help translating the app
  • New feature suggestions
  • Answering questions on issues
  • Documentation improvements
  • Reviewing pull requests
  • Helping to manage issue priorities
  • Fixing bugs/new features

If any of that sounds cool to you, feel free to dive in! Open an issue or submit a pull request.

If you would like to help contribute to the project, please see the Contributing Guide

And if you want to build the app yourself take a look at the Installation Guide

License

This project is open source under the MIT license, which means you have full access to the source code and can modify it to fit your own needs. See LICENSE for more information.

MIT © Jack Mallers

zap-ios's People

Contributors

chitowncrispy avatar jimmymow avatar keeshux avatar knutnyg avatar ottosuess avatar reez avatar robbaltzer avatar sohomang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zap-ios's Issues

Support connect via Tor

In #42 you mentioned you're looking into Tor support. This is meant to track that feature.

As of right now I'm getting "Could not connect to server", when the certificate and address are in place, the hidden service address is in the "Address" field, and lnd.conf has tlsextradomain set to the hidden service domain.

BitRefill.Com invoice QR code gives "Unknown link format".

Describe the bug
A clear and concise description of what the bug is.

When I go to BitRefill.Com, and set up an invoice, and scan the QR code, I get: "Unknown link format".

To Reproduce
Steps to reproduce the behavior:

  1. Set up invoice at BitRefill.Com for Lightning Network (mainnet)
  2. Zap: select Send
  3. Point at QR code displayed by BitRefill.Com
  4. See error

Expected behavior

Continue past that error. For instance, I was able to copy and paste the link, and then I got the next step, which in my case was another error ("Unable to find a path to ..." which is an LND issue).

Screenshots

Your environment

  • Device: iPhone6+
  • OS: iOS 11.4.1
  • Version 0.1.0, build 1

Additional context

Unable to update pods on master

Describe the bug
Running pod install Bond leaves me:

13:31:21-knut.nygaard~/code/zap (master) $ pod update Bond
Updating local specs repositories
Analyzing dependencies
Fetching podspec for `LndRpc` from `.`
Downloading dependencies
Installing !ProtoCompiler (3.6.0)
Installing !ProtoCompiler-gRPCPlugin (1.18.0)
Installing BigInt 3.1.0
Installing Bond 7.1.0 (was 6.10.2)
Using BoringSSL-GRPC (0.0.2)
Using Differ (1.3.0)
Using KeychainAccess (3.1.2)
Installing LndRpc 0.0.3
[!] /bin/bash -c 
set -e
mkdir -p Pods/LndRpc
Pods/!ProtoCompiler/protoc         --plugin=protoc-gen-grpc=Pods/!ProtoCompiler-gRPCPlugin/grpc_objective_c_plugin         --objc_out=Pods/LndRpc         --grpc_out=Pods/LndRpc         -I Proto         --proto_path=googleapis         -I Pods/!ProtoCompiler         Proto/*.proto

googleapis: warning: directory does not exist.
google/api/annotations.proto: File not found.
LndRpc.proto: Import "google/api/annotations.proto" was not found or had errors.

To Reproduce

  1. Do a clean clone of zap-ios
  2. run pod update Bond

Expected behavior
Cocoapods updating Bond

Your environment

  • MacOs

Incorrect balance reported

Opening the Homepage shows an incorrect balance vs my lnd node which I am connected to. In this case the discrepancy is:
Zap: 10,253,348
lnd: 2,667,336

I am using Zap 0.1.0 build:14 on iOS 12.1 (16B92) on an iPhone X 256GB
with
lnd 0.5.1-beta on Intel NUC running Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-39-generic x86_64)

Expected behavior
Correct balance

Screenshots
img_1305

Receive screen is cut off on iPhone SE

Background

On the receive screen I cannot see the amount I am entering, or any other info that might be there.

Your environment

  • Zap iOS Version 0.1.0
  • iOS Version 11.4.1
  • iPhone SE

Steps to reproduce

Enter the app, click Receive

Expected behaviour

Be able to see the amount I am entering. See screenshot:

iphonese

Actual behaviour

Remove “Lightning:” in the payment request

I noticed a few times that a requested payment starts with lightning:

However, most sites, shipped etc don’t accept this and therefor give an error. Would be nice if it would only generate a request without Lightning: in front of it.

Hi. I am running RaspiBlitz and would like to connect my IOS Zap Wallet. I am connecting to it via Putty from a Windows 10 Machine. When I generate the QR code, it is too large for my screen, and the ctrl- control does not work to shrink the image. I have tried to use the zapconnect -j command, but I get bash- command not found. I wonder if there is a different way to shrink the code or better instructions for running the zapconnect -j command. Thanks in advance.

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Fees should not be displayed as mBTC

Fees in the Transaction Detail view are currently always 0,0 mBTC. There should be a lower denomination for the fees in order for the user to be able to see them.

Litecoin Support

Currently we don't really support LTC. We only use Bitcoin icons, only convert to BTC price, etc. I think it would be valuable if we supported Litecoin and allowed the user to pick which chain they'd like to launch on during onboarding.

Home page graph seems broken

Describe the bug
My graph on the home page seems to be displaying inaccurate numbers

Expected behavior
Correct numbers :p

Screenshots
image

I do not have 0.8 BTC ^

Additional context
I've also been spending frequently but don't seem to have the line changing. I assume it's because the numbers on the right are off

Failed to send

Description
When I try to send money to my buddy it fails to send.

To Reproduce
Buddys phone: click on Receive,
Lighting,
Enter 100sat,
Click on Next,
Generate Request.

My phone: Click on send,
Scan QR code,
Click send,
Enter passcode.
It endlessly says "sending...".

Expected behavior
Should send 100sat to my buddies wallet.

Screenshots
My buddies QR code

img_0081

My screen after I click send.

img_0080

Your environment

  • software : zap ios
  • devices : iphones
    Me and my buddy both have channels to our hub/ipad

Additional context
I am talking to @mrfelton on slack and there seams to be a problem with the private tag in the invoices. And their missing routing hints.

only disable idleTimer when needed (during syncing)

The phone does not lock at all when the app is running.
We want the phone to lock except when lnd is running on the phone and is syncing.

right now it is done in the AppDelegate:

UIApplication.shared.isIdleTimerDisabled = true

waitingCloseChannels are not displayed

Describe the bug
Lnd's PendingChannels result contains an array of WaitingCloseChannels.
The Channels in this array should be displayed as closing channels on the channel screen in the app but right now they are ignored.

To Reproduce
Close a channel, call lncli pendingchannels you see the closed channel under "waiting_close_channels": [ but not in the app.

Expected behavior
The channel should be displayed in the app with a "Closing" label.

Additional context
There is an extension of LNDPendingChannelsResponse that transforms all pending channels to Channel structs here:
https://github.com/LN-Zap/zap-iOS/blob/master/SwiftLnd/Model/Channel.swift#L56

It might be enough to just do the same as with pendingOpenChannelsArray, pendingClosingChannelsArray & pendingForceClosingChannelsArray , just for the waitingCloseChannelsArray.

Syncing screen % stays at 0 no matter what

Background

When connecting to a new LND node syncing the syncing screen shows 0% no matter what block height my node is at

image from ios

Your environment

Bitcoin testnet
BTCD full node
LND full node

  • version of Zap
    Zap 0.1.0
  • which version of iOS are you using
    iOS 11.4.1

Steps to reproduce

Connect a node that is in the middle of syncing

Expected behaviour

The syncing screen should show accurate % throughout the syncing process

Actual behaviour

Stays at 0%

display success toast when address is copied to clipboard

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Payment received history shows wrong amount with 0 invoices

Describe the bug
Payment received history shows the wrong amount if an invoice with 0 amount is created and is payed with an amount larger than 0

To Reproduce
Steps to reproduce the behavior:

  1. Create an invoice with 0 sat
  2. Pay the invoice from another account with 10 sat
  3. The invoice shows up as payed 0 sat

Expected behavior
Invoice should show 10 sat payed even if the requested amount was 0. Everything else in the UI reflects that the payment has been made with the correct amount.

Your environment

  • iPhone X
 {
            "memo": "",
            "receipt": null,
            "r_preimage": "",
            "r_hash": "",
            "value": "0",  <---- dont use this value
            "settled": true,
            "creation_date": "1546588826",
            "settle_date": "1546588867",
            "payment_request": "",
            "description_hash": null,
            "expiry": "3600",
            "fallback_addr": "",
            "cltv_expiry": "144",
            "route_hints": [
            ],
            "private": false,
            "add_index": "5",
            "settle_index": "1",
            "amt_paid": "43485000",  <--- use this value instead
            "amt_paid_sat": "43485",
            "amt_paid_msat": "43485000"
        }

Connect Remote Node - Paste feature

What do I "Paste" to connect to my remote node in zap-iOS?

I tried "zapconnect > temp" and then pasting "temp" in zap-iOS but no joy.

Would be easier to just paste the IP, macaroons, and tls manually.

Request: Confirm 'Closing of Channel'

Background

On the channel information screen there is the 'Done' on the upper right, and 'Close' at the bottom. I personally had a moment of confusion on which button will simply close the window, and accidentally closed a channel.

Your environment

  • Zap 0.1
  • iOS 11.4.1

Steps to reproduce

Expected behaviour

I think either the UI needs some work or at least a window to confirm the user wants to close the channel.

Actual behaviour

Clicking 'Close' immediately closes the channel.

Some channels don't have a name

One active and one offline channel don't show a name for me (i.e. the node's alias). This is the node of the active channel that does not appear to have a name link, it seems that it does have a regular alias so not sure why it is not showing up. In any case maybe there should be a general fallback.

Also see screenshot:
unnamed

Center toast text.

Currently the toast (message at top of screen) is left justified. Should we center it? Looks a bit better to me.

Localize number and date formatting in english

As an english user of the app I would expect the number formatting to be in english as well: the decimal separator should be a dot not a comma.

0,1 mBTC should be 0.1 mBTC

As a US user I would also expect the date formatting on the graph in the wallet screen to be formatted MM/DD/YYYY.

16.10.2018 should be 10/16/2018.

Cannot connect to remote node public IP

  1. How safe is it to use Zap to connect to my LND server via public IP?
  2. I can connect to my LND backend via its private LAN IP# (10.x.x.x address), make payment to invoice, etc., but when I try to my public IP# (confirmed port forwarded using tcpdump), it gives a failure error (with no further details) in Zap. The configuration from zapconnect doesn’t work unless I edit the IP address to be the internal (behind NAT) LAN ip#, which is always how I’ve (successfully) used Zap so far, but I want to make it more mobile now, obviously, so I can use it places other than home. I have the externalip set correctly in lnd.conf.

Any ideas? How do I debug this? I don’t see any log entries in lnd’s log file despite it having listening port and occasionally an open tcp connection that Zap says doesn’t work for it.

"Touch ID for Zap" presented throughout app usage

Describe the bug
I am presented "Touch ID for Zap" when not needed. Randomly it will pop up while I'm using the app, sending transactions, opening channels, etc.

To Reproduce
Steps to reproduce the behavior:
Scan a payreq QR code
Pay the payreq

Expected behavior
I should only have to touch ID to auth into my wallet or maybe also to confirm payment. But the payment went through already

Screenshots
img_1517

Your environment

  • Device: iPhone8
  • OS: iOS 11.4.1

Add lnd simnet integration tests.

Introduction

It would be awesome to have integration tests to validate real interactions between lnd and the iOS app.
The app is running on the iOS simulator and can not easily setup a local regtest cluster on the host machine. But the host and the iOS simulator share the same network. So we can run a simple server on the host responsible for setup, teardown and manipulation of the regtest cluster. The test target running on the iOS simulator can then communicate with that server by talking to its api on localhost.
We can then connect the app over rpc to an lnd instance from that cluster, manipulate that cluster via the server and validate expected results.

We could even run the integration tests on travis for multiple different lnd versions to test regressions.

I've started with a very simple implementation of the test server on the feature/test_server branch.

Python Server

On the one hand there is a python server responsible for setting up the lnd regtest cluster (https://github.com/LN-Zap/zap-iOS/tree/feature/test_server/TestServer)

The fixtures folder contains tls certificates and macaroons, main.py is the server, methods.py contains all the methods the iOS tests can call on the server.

You can test the sever by running python3 main.py and then open localhost:8080/start in your browser to start the basic test cluster, open localhost:8080/stop to stop the test cluster.

Test Target

On the other hand there is the LndIntegrationTests target of the iOS app. (https://github.com/LN-Zap/zap-iOS/tree/feature/test_server/LndIntegrationTests)

The TestServer.swift defines the interface to the python server, LndIntegrationTests.swift contains an example test case (that is not testing anything right now).

Regtest Cluster

Here is a helpful document that explains how to setup the regtest cluster: https://dev.lightning.community/tutorial/01-lncli/

TODO:

  1. It would already be very cool to get one example test working. Currently I get an rpc error when I try to access the local cluster from the iOS test target.
  2. Add some more methods to the server. we need the option to run multiple lnd instances so we can test receiving and sending funds from one instance to the other.
  3. Add some more sophisticated test.
  4. Configure tests to run on travis (maybe even with multiple different lnd versions)
  5. ??? 🔥

use face id / touch id to confirm send

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Wallet Balance: Show what is in Channels and On chain

Is your feature request related to a problem? Please describe.
Currently there is no easy way to see how much of your wallet balance is in channels and how much is on chain.

Describe the solution you'd like
On the main wallet screen I'd like to see a breakdown of the total so that the user can see what is currently in channels and what is on the blockchain.

Describe alternatives you've considered
Basic Example of wallet balance screen:
1,000,000s
⚡ 500,000s
🔗 500,000s

Switch between saved Remote Node Configs

This is certainly more of a power user feature but I think it would be really great if users could switch between different remote note configs that are saved in the app. This would allow to switch between testnet and mainnet nodes easily for example. Another use case could be users that have a business and want to switch between their business node and their private node.

So instead of just being able to reset the remote node config in the settings, there would be a management menu where I could add and remove remote node configs and activate one of them to be used in the rest of the app.

Request: Sending coins onchain

Background

scanning normal onchain btc qr code crashes the app

Your environment

Zap 0.1.0
iOS 11.4.1 on iPhone 7

Steps to reproduce

scan btc qr code using send

Expected behaviour

ability to send onchain from wallet or give error message

Actual behaviour

crashes

Invoice settlement does not get reflected in the UI

When an invoice is settled, it doesn't get reflected in the history UI

I traced it back to here:

if invoice.settled {

Nothing really seems to happen, and I'm not sure why settled invoices are modeled as payments?

This happens when you receive a settlement to any invoice

In theory it should insert a new history event or mark the existing invoice as settled

I tested this in xcode in a simulated environment and on my iphone 8 plus

Creating invoices is buggy

Describe the bug
A clear and concise description of what the bug is.

Creating invoices is buggy. Sometimes it hangs, and sometimes it doesn't.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Your environment

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Version [e.g. 22]

I'm using the latest LND.

Additional context
Add any other context about the problem here.

Could not connect to server [SOLVED - TLS issue].

Describe the bug
Unable to connect to lnd node even though everything should be set up correctly.

  • lnd is up and running with all the correct params.
  • synced to chain.
  • wallet unIocked.
  • I can telnet <ip> 10009 no problem 🤷‍♂️
  • certs look correct
  • zapconnect worked perfectly

Seems like it's not even trying, I get the error immediately.

Expected behavior
Should be able to connect 😛

Your environment

  • Device: iPhone6s
  • OS: iOS 11.2.5
  • Version: latest from TestFlight

add "add coin" view for funding the wallet

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

When closing a channel the wrong channel is removed from the UI.

Describe the bug
When closing a channel the wrong channel is removed from the UI.

To Reproduce
Steps to reproduce the behavior:

  1. Open two channels with the same node.
  2. Close channel A.
  3. Notice that channel B is removed from the UI.
  4. Close zap (force close on iPhone) and reopen.
  5. Notice that channel B is the only one displaying (channel A did close correctly).

Expected behavior
Channel A should be removed from the UI.

Screenshots
If applicable, add screenshots to help explain your problem.

Your environment
iPhone SE

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.