Coder Social home page Coder Social logo

matter-labs-archive / franklinpay-ios Goto Github PK

View Code? Open in Web Editor NEW
35.0 35.0 15.0 71.14 MB

Secure Dollar Wallet

Home Page: https://franklin-pay.herokuapp.com/

License: MIT License

Swift 23.05% JavaScript 76.66% Ruby 0.04% HTML 0.22% Shell 0.02%
dapp deep-links ethereum smart-contracts solidity wallet web3swift

franklinpay-ios's People

Contributors

baldyash avatar fesenkog avatar fradeliro avatar irkor avatar skywinder avatar vldmrkl 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

franklinpay-ios's Issues

Feature: add private key data safely in iCloud

Current behavior:
Now you can perform backup only with your pen and paper.

Expected behavior:
It should be possible to encrypt it and add in iCloud.

Suggested solution:
You should add in BackupViewController.xib some button like "Save in iCloud" and use CloudKit to perform saving backup. Also you should encrypt it before saving and add possibility to decrypt.

Acceptance Criteria:
The code is written in new branch named feature/iCloudBackup or something like that.
The code implements the targets described above
The code can be merged into the develop branch without conflicts.

Required Skill:
Participants needs to have an experience in Swift software development.

Enable payments via NFC

As we've mentioned a couple of times - our global goal is to fully reference FinTech functionality. NFC payments support is just a part of it, because it will make things much easier for users, hence, more people will use cryptocurrencies in everyday life.

Add CONTRIBUTING.md

It would be really useful to have CONTRIBUTING.md for new developers coming to the project. At the moment, there is the only small section in the README.md, but it only mentions usage of Swiftlint.

I would like to have some kind of guide where I can find how to run the app locally, what sample input data I use to proceed (as I found, I should use "Mnemonics" in "import wallet").

Add possibility to add custom network

Current behavior:
There are only 3 networks you can choose on Networks Screen that is available from Settings Screen.

Expected behavior:
Need option to add custom network with following parameters:

  • Network name
  • Network ID
  • Network URL

Suggested solution:
Possibility to add network should be available from separate controller, for example - create new CreateNetworkViewController.swift with xib file for it in CreateNetworkViewController.xib.

You will need to create some struct CustomNetwork, make it encodable & decodable.

//Just an example

import Foundation
import BigInt
import web3swift

struct CustomNetwork {

    let networkName: String?
    let networkId: BigUInt
    let fullNetworkUrl: URL
    
    enum CodingKeys: String, CodingKey {
        case id = "networkId"
        case networkName
        case networkUrl
    }
    
    init(networkName: String? = nil,
         networkId: BigUInt,
         networkUrlString: String,
         accessToken: String? = nil) {
        self.networkName = networkName
        self.networkId = networkId
        let requestURLstring = networkUrlString + (accessToken ?? "")
        guard let urlString = URL(string: requestURLstring) else {
            self.fullNetworkUrl = URL(string: "https://rinkeby.infura.io")!
            return
        }
        self.fullNetworkUrl = urlString
    }
}

So you need 3 text fields in your screen for name, id and url and "Add" button.

After creating custom network it should be selectable and you should be able work in it. So test it.

Acceptance Criteria:
The code is written in new branch named feature/CustomNetworks or something like that.
The code implements the targets described above
The code can be merged into the develop branch without conflicts.

Required Skill:
Participants needs to have an experience in Swift software development.

Support ERC-721 Tokens

Create user-friendly interface and give user the ability to use ERC-721 tokens easily.

Feature: cancel Franklin cheques

Current behavior:
No possibility to cancel Franklin cheques.

Expected behavior:
When Franklin cheque isn't accepted, it should be possible to cancel it.

Solution:
Use Matter Plasma Ignis API

Support ERC-20 Tokens

For now we have functionality for signing and sending transactions with ERC20 tokens, but there is no user-friendly interface for this.

Android application

All the functionality available on iOS should be ported to Android as well.

Add link to etherscan from transactions at Transactions Screen

Current behavior:
There is just the transactions history list screen now that presents table view with transactions list in it. It's possible to show All, Send, Received, Confirming transactions.

Expected behavior:
It would be useful to have possibility to open info about transaction from etherscan in WebView with transaction hash.

Suggested solution:
List of transaction is loading in TransactionsHistoryViewController.swift. There is array of transactions:

var transactions = [[ETHTransactionModel]]()

Transaction Model is written in Transaction.swift:

struct ETHTransactionModel {
    let transactionHash: String
    let from: String
    let to: String
    let amount: String
    let date: Date
    let data: Data?
    let token: ERC20TokenModel? // nil if it is custom ETH transaction
    let networkID: Int64
    var isPending = false
}

struct TransactionInfo {
    var contractAddress: String
    var transactionIntermediate: TransactionIntermediate
    var methodName: String
}

enum TransactionType {
    case custom
    case arbitraryMethodWithParams
}

You will need its hash:

let transactionHash: String

You can use in TransactionsHistoryViewController UITableViewDelegate method:

func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)

The delegate handles rows selections in this method. In other words - tap on row with transaction.
Write in this method code that will open UIWebView with transaction in etherscan.
For example, you tapped row of transaction with hash

0x463291e9bb9e97f6611156a407593c77dc86cb4cbc5a7dfbfaaa63c1e5acea7b

You need to open in WebView next URL:

https://etherscan.io/tx/0x463291e9bb9e97f6611156a407593c77dc86cb4cbc5a7dfbfaaa63c1e5acea7b

You also need to provide an opportunity to close this view. Just place UIButton with some closing image on top right corner.

It will be great if you implement UIProgressView in this view - to show loading process.

For loading you can use URLSession

Acceptance Criteria:
The code is written in new branch named feature/Etherscan or something like that.
The code implements the targets described above
The code can be merged into the develop branch without conflicts.

Required Skill:
Participants needs to have a bit of experience in Swift software development

Add Alamofire lib and use it

Current behavior:
Now it is native URLSession used to load some data and interact with APIs.

Expected behavior:
Add Alamofire lib and rewrite URLSessions with Alamofire.

Suggested solution:
You can add Alamofire lib via CocoaPods.
Now only 4 files need to be changed: look at @klymenkoo comment.
All networking should be the separate class, that has functions with required parameters and do all the work by Alamofire.

Acceptance Criteria:
The code is written in new branch named feature/Alamofire or something like that.
The code implements the targets described above.
The code can be merged into the develop branch without conflicts.

Required Skill:
Participants needs to have a bit of experience in Swift software development.

Add transaction info screen

Current behavior:
There is just the transactions history list screen now that presents table view with transactions list in it. It's possible to show All, Send, Received, Confirming transactions.

Expected behavior:
It would be useful to have possibility to show info about transaction in separate screen.
The info should include following details:

  • Hash
  • Status (pending/success)
  • Direction (in/out)
  • From address
  • To address
  • Amount
  • Data
  • Network

Suggested solution:
List of transaction is loading in TransactionsHistoryViewController.swift. There is array of transactions:

var transactions = [[ETHTransactionModel]]()

Transaction Model is written in Transaction.swift:

struct ETHTransactionModel {
    let transactionHash: String
    let from: String
    let to: String
    let amount: String
    let date: Date
    let data: Data?
    let token: ERC20TokenModel? // nil if it is custom ETH transaction
    let networkID: Int64
    var isPending = false
}

struct TransactionInfo {
    var contractAddress: String
    var transactionIntermediate: TransactionIntermediate
    var methodName: String
}

enum TransactionType {
    case custom
    case arbitraryMethodWithParams
}

This model is already has everything you need to show about transaction.

Firstly: create TransactionInfoController.swift and xib file for it - TransactionInfoController.xib
Build interface that will include labels with transaction info details.

Next: you can use in TransactionsHistoryViewController UITableViewDelegate method:

func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)

The delegate handles rows selections in this method. In other words - tap on row with transaction.
Write in this method code that will open new TransactionInfoController :

//Just an example. You need to decide on your own how to init your controller.
guard let indexPathForSelectedRow = tableView.indexPathForSelectedRow else {return}
let cell = tableView.cellForRow(at: indexPathForSelectedRow) as? TransactionCell
guard let selectedCell = cell else {
    return
}
guard let indexPathTapped = tableView.indexPath(for: selectedCell) else { return }
let transaction = transactions[indexPathTapped.row]
let transactionInfoController = TransactionInfoController(transaction: transaction)
self.navigationController?.pushViewController(transactionInfoController, animated: true)

Acceptance Criteria:
The code is written in new branch named feature/TransationInfoController or something like that.
The code implements the targets described above
The code can be merged into the develop branch without conflicts.

Required Skill:
Participants needs to have an experience in Swift software development.

Add «Contacts screen» where saves Contact name - Contact address pairs

Expected behavior:
It is needed another screens:

  • Contacts list
  • Create/change contact
    It should be possibility to save “name - address” as contact and use it when sending transaction. You can select contact to send transaction from:
  • Preparing transactions screen by selecting it in some drop-down menu
  • Contracts list (you need to build it). After selecting the contract opens Prepare transaction screen with a already added contact address.

Solution:
You need to make:

  • ContactsViewController class and XIB for it. It should represent the list of added contacts in table view.
  • CreateContactViewController and XIB for it. Here you can save contact with name and address.
    Use CoreData as DB to save contacts.

Acceptance Criteria:
The code is written in new branch named feature/Contacts or something like that
The code implements the targets described above
The code can be merged into the develop branch without conflicts.

Required Skill:
Participants needs to have an experience in Swift software development.

Feature: Pending transactions

Current behavior:
Now you can only get past transactions and show them

Expected behavior:
Needs to get pending transactions and show them

Solution:
You can use txpool, made by @currybab in his PR
For Franklin use Matter Plasma Ignis API to get pending transactions.

Interaction with Web applications

There are three possible ways to implement this:

  • Using QR code on the web page to identify the device and then send push notification onto it to confirm the transaction.
  • Force web-developers to use EIP681 standard to form QR codes, which could be easily caught by our application.(Library for serialising/deserialising is already in stage of Pull Request for web3.js library)
  • Send push notifications to users based on the ethereum addresses they are storing in their devices via DiveLane.

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.