Giter Club home page Giter Club logo

alpha-wallet-android's Introduction

Gitpod ready-to-code

AlphaWallet - Advanced, Open Source Ethereum Mobile Wallet & dApp Browser for Android

Lint Unit test E2E Test Maintenance GitHub contributors MIT license

AlphaWallet is an open source programmable blockchain apps platform. It's compatible with tokenisation framework TokenScript, offering businesses and their users in-depth token interaction, a clean white label user experience and advanced security options. Supports all Ethereum based networks.

AlphaWallet and TokenScript have been used by tokenisation projects like FIFA and UEFA’s blockchain tickets, Bartercard’s Qoin ecommerce ecosystem, several Automobiles’ car ownership portal and many more.

⭐ Star us on GitHub — it helps!

alphawallet open source wallet android preview Get AlphaWallet Open Source Wallet on Google Play

About AlphaWallet - Features

Easy to use and secure open source Ethereum wallet for Android and iOS, with native ERC20, ERC721, ERC1155 and ERC875 support. AlphaWallet supports all Ethereum based networks: Ethereum, Gnosis, Ethereum Classic, Binance Smart Chain, Heco, Polygon, Avalanche, Fantom, L2 chains Optimistic, Arbitrum and Linea, and Palm. TestChains: Sepolia, Holesky, Goerli, Binance Test, Fuji (Avalanche test), Fantom Test, Polygon Test, Optimistic and Arbitrum Test, Cronos Test and Palm test.

  • Beginner Friendly
  • Secure Enclave Security
  • Web3 dApp Browser
  • TokenScript Enabled
  • Interact with DeFi, DAO and Games with SmartTokens
  • No hidden fees or tech background needed

AlphaWallet Is A Token Wallet

AlphaWallet's focus is to provide an interface to interact with Ethereum Tokens in an intuitive, simple and full featured manner. This is what sets us aside from other open source ethereum wallets.

Select Use Cases

TokenScript Support

With TokenScript, you can extend your Token’s capabilities to become "smart" and secure, enabling a mobile-native user experience 📱

“SmartTokens” are traditional fungible and non fungible tokens that are extended with business logic, run natively inside the app and come with signed code to prevent tampering or phishing. It allows you to realise rich functions that Dapps previously struggled to implement. With SmartTokens you can get your token on iOS and Android in real time without the need to build your own ethereum wallet.

AlphaWallet is the “browser” for users to access these SmartTokens. You can get the most out of your use case implementation... without leaving the wallet.

Visit TokenScript Documentation or see TokenScript Examples to learn what you can do with it.

Philosophy

AlphaWallet is founded by blockchain geeks, business professionals who believe blockchain technology will have a massive impact on the future and change the landscape of technology in general.

We are committed to connecting businesses and consumers with the new digital economic infrastructure through tokenisation. Tokenised rights can be traded on the market and integrated across systems, forming a Frictionless Market and allowing limitless integration with the web.

We want to give businesses the whitelabel tools they need to develop their ethereum wallets, and join the tokenised economy.

Getting Started

  1. Download Android Studio.
  2. Clone this repository
  3. Obtain a free Infura API key and replace the one in build.gradle
  4. Generate a GitHub Personal Access Token with read:packages, read:user permission
  5. Edit ~/.gradle/gradle.properties add blow properties:
gpr.user=Your GitHub Email
gpr.key=The GitHub Personal Access Token you created in previous step
  1. Build the project in AndroidStudio or Run ./gradlew build to install tools and dependencies. See BUILD.md for more details.

You can also build it from the commandline just like other Android apps. Note that JDK 17 is the version now supported by Android. We build with the JetBrains JDK.

Find more information in our available documentation.

Add your token to AlphaWallet

If you’d like to include TokenScript and extend your token functionalities, please refer to TokenScript.

Add dApp to the “Discover dApps” section in the browser

Submit a PR to the following file: https://github.com/AlphaWallet/alpha-wallet-android/blob/master/app/src/main/assets/dapps_list.json

How to Contribute

You can submit feedback and report bugs as Github issues. Please be sure to include your operating system, device, version number, and steps to reproduce reported bugs.

How to customise the appearance of your wallet fork

If you are forking AlphaWallet, and have a token that you want to be locked visible this can now be done easily. Let's say we want to only show Ethereum Mainnet, and always show the USDC stablecoin.

class CustomViewSettings
{

...

    private static final List<TokenInfo> lockedTokens = Arrays.asList(
            // new TokenInfo(String TokenAddress, String TokenName, String TokenSymbol, int TokenDecimals, boolean isEnabled, long ChainId)
            new TokenInfo("0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "USD Coin", "USDC", 6, true, EthereumNetworkBase.MAINNET_ID)
    );
    
    private static final List<Integer> lockedChains = Arrays.asList(
            EthereumNetworkBase.MAINNET_ID
    );

Further, you may have your own Dapp that sells or uses the USDC that you want your users to use.

public static boolean minimiseBrowserURLBar() { return true; } //this removes the ability to enter URL's directly (they can be clicked on within your dapp)
public abstract class EthereumNetworkBase ...
{
    private static final String DEFAULT_HOMEPAGE = "https://my-awesome-nfts.com/usdc/";

If you are forking AlphaWallet and you have a cool Token, please consider donating a small amount of said Token to alphawallet.eth to help fund continuing development of the main repo.

Request or submit a feature 📮

Would you like to request a feature? Please get in touch with us Discord, Twitter or through our community forums.

If you’d like to contribute code with a Pull Request, please make sure to follow code submission guidelines.

Spread the word 🐥

We want to connect businesses and consumers with the new digital economic infrastructure, where everyone can benefit from technology-enabled free markets. Help us spread the word:

share on linkedin share on twitter send via email share on reddit share on facebook

To learn more about us, please check our Blog or join the conversation:

Contributors

Thank you to all the contributors! You are awesome.


James Sangalli

💻

Victor Zhang

🤔

Hwee-Boon Yar

🤔

AW-STJ

📆

Tomek Nowak

🎨

Weiwu Zhang

💻

James Brown

💻

Roman Storm

🐛

justindg

💻

Marat Subkhankulov

💻

Maksim Rasputin

💻

Lucas Toledo

💻

Farrah Fazirah

💻

Chintan Rathod

💻

Liu Yue

💻

Peter Grassberger

💻

daboooooo

💻

Sergej Kunz

💻

Cory Smith

💻

Corey Caplan

💻

Philipp Rieger

💻

Tal Beja

💻

Alex Soong

💻

BTU Protocol

💻

Alex Tsankov

💻

Anna R

💻

TamirTian

💻

Andrew

💻

Ling

💻

Timur Badretdinov

💻

License

AlphaWallet Android is available under the MIT license. Free for commercial and non-commercial use.

alpha-wallet-android's People

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  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

alpha-wallet-android's Issues

In test cases: Can you use assert instead of println?

If you use assert, we don't need to understand the output in order to tell if it is working. Right now MarketOrderTest prints hundreds of lines of incremental numbers, is it success or failure?

By the way, Market Order does not mean "order in the market". it means an order without expiry and is instantly dealt.

home page button order

Currently, the order is Transactions, Marketplace, Wallet and Settings
Please follow the UI/UX design, change the order to:
Marketplace, Wallet, Transactions and Setting

BadContract with James Sangalli's link

Not sure if this is James' side of a problem but he seems to be overloaded for now.

Reproduce:

  1. Access https://app.awallet.io/AAAAAFsRIzYnexMYllAwxi4drJZxpvjfd_hVz4D1GIzi_GsFof6snDKbuRK-2g47Q-koJDIL9J1p0ttXmmpr8tpwpvkeemF9pGJi6Ph-PCyffJ7Jn9t9iRG0eDfYWBw=

  2. You get

Import null (null) asset

While the server produces:

io.stormbird.token.entity.BadContract
at io.stormbird.token.web.Ethereum.TransactionHandler.getBalanceArray(TransactionHandler.java:67)
at io.stormbird.token.web.AppSiteController.decodeLink(AppSiteController.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:877)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:783)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:866)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

UI for ETH Page on Android app

Currently, when you click on ETH, it shows a totally different UI compare with clicking ticket token.
For the first release, we will use the same UI as ticket token for ETH.
The differences are:

  1. the Redeem and Sell button is in grey colour without any function. only Transfer works
  2. instead of showing ticket details, it shows your wallet address in TXT and in QR code.
  3. after clicking transfer, don't need to show "tickets selecting" page, jump directly to 'input' number page.
  4. after input number and click transfer button, it shows the "select option to transfer" page. in this page, "send sms/whatsapp" and "send email" should be in grey colour without functions.

Minor issues with UI update

Hi Justin, there's a few things I spotted.

  • Price change on main screen (integrate tickers - I will provide the data source).
  • set total ticket price on 'Set a Price:' screen + limit ticket sale count to total tickets in range.
  • Allow a way to remove tokens (or hide them).
  • in 'AssetDisplayActivity' the Redeem/Sell/Transfer bar overwrites the bottom of the listview.
  • Redeem allocation is messed up (I will fix).
  • Selecting quantity in RedeemAssetDisplayActivity allows you to select any value, also it should default to 1.
  • The ticket displayed below the QR code displays incorrectly when it's redeeming a single ticket.
  • Any way to stop the listview from flickering on the front page, ie tokens view? Maybe on refresh detect any change. Can we do in-place updates on the listview items? Then we only need a full refresh if there's a new token.

UI for Sell function

We will need to change the Sell button function, instead of listing the token in the marketplace, the token will be sold through a shareable "selling link"

So besides input for "price per ticket" and "quantity of tickets", there should be one more place to input "Link Expired date/valid until"

img_2713

"Backup your key reminder" and changing the initial activity

  1. When the user has Ether in his/her wallet for the first time, there should be a prompt message asking for backup, which leads to (for now) viewModel.exportWallet;

(In fact, exportWallet may be replaced because we use Mnemonics)

  1. When 1) is done, the initial activity should be set to the asset view.

Remove "Tickets" Tab

The result of discussion: merge tickets into Assets, so that we have only 3 tabs:

ALL, CURRENCY, ASSETS

Tickets are in "Assets".

Victor Zhang can explain why, if you need an answer.

Market order not replaced by newer one

I create a market order, it appears correctly:

{
"price": "0.000000000000000003",
"start": "3",
"stop": "5",
"count": "3",
"expiry": "1519195776",
"message": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWo0WgLyaECakvG8LqLvkhtHQnaVzKznkABcAGAAZ)",
"signature": "CmeQwShyRITgat7LDSf1NtGoKP9hJp87xFEVcQAkjx1NemYNS8AgQyARV5ChxEGHNkiW+oZ0ym3zqCa+4tgY3QE="
},

I then see I got the price wrong. So, I update the price and re-submit. Now, I see that it didn't replace the previous order:

    {
        "price": "0.000000000000000003",
        "start": "3",
        "stop": "5",
        "count": "3",
        "expiry": "1519195776",
        "message": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWo0WgLyaECakvG8LqLvkhtHQnaVzKznkABcAGAAZ)",
        "signature": "CmeQwShyRITgat7LDSf1NtGoKP9hJp87xFEVcQAkjx1NemYNS8AgQyARV5ChxEGHNkiW+oZ0ym3zqCa+4tgY3QE="
    },
    {
        "price": "2.47",
        "start": "3",
        "stop": "5",
        "count": "3",
        "expiry": "1519195943",
        "message": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZtWbvXmlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWo0XJ7yaECakvG8LqLvkhtHQnaVzKznkABcAGAAZ)",
        "signature": "/CxzwjmMYPj5FSiL0Zgwlst7cpvsCBSPXTEFEHGKtvR9xawGc0Sfipdt74Pqgb9ZPHb4lwky4yA2z7nDHQ/zhAE="
    }

This is not expected behaviour.

iOS starting page and wallet backup

  1. it forces the user to backup wallet since the beginning. it should be only required when the user has any ETH in his wallet. We should use "create new wallet or import wallet" page to replace the"No backup, no ETH" page.
  2. the current backup method is password+keystore, not the seed phrase. are we going to change it into seed phrase mode?

use C libraries for market-queue

If libgmp-dev is not installed, this would happen

Collecting fastecdsa
  Downloading fastecdsa-1.6.1.tar.gz
Installing collected packages: fastecdsa
  Running setup.py install for fastecdsa ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-8um44_ls/fastecdsa/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-l4xv91dv-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.5
    creating build/lib.linux-x86_64-3.5/fastecdsa
    copying fastecdsa/__init__.py -> build/lib.linux-x86_64-3.5/fastecdsa
    copying fastecdsa/keys.py -> build/lib.linux-x86_64-3.5/fastecdsa
    copying fastecdsa/util.py -> build/lib.linux-x86_64-3.5/fastecdsa
    copying fastecdsa/point.py -> build/lib.linux-x86_64-3.5/fastecdsa
    copying fastecdsa/benchmark.py -> build/lib.linux-x86_64-3.5/fastecdsa
    copying fastecdsa/curve.py -> build/lib.linux-x86_64-3.5/fastecdsa
    copying fastecdsa/test.py -> build/lib.linux-x86_64-3.5/fastecdsa
    copying fastecdsa/ecdsa.py -> build/lib.linux-x86_64-3.5/fastecdsa
    running build_ext
    building 'fastecdsa.curvemath' extension
    creating build/temp.linux-x86_64-3.5
    creating build/temp.linux-x86_64-3.5/src
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Isrc/ -I/usr/include/python3.5m -c src/curveMath.c -o build/temp.linux-x86_64-3.5/src/curveMath.o -O2
    In file included from src/curveMath.c:1:0:
    src/curveMath.h:6:17: fatal error: gmp.h: No existe el archivo o el directorio
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-8um44_ls/fastecdsa/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-l4xv91dv-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-8um44_ls/fastecdsa/

Market Order server timeout params

Adjust timeout params to ensure all 2016 orders can be written.

Currently the server times out the connection after about 1/2 to 3/4 of the orders are written - 1000 orders works but 2016 doesn't.

UI of iOS and a small bug

img_9550 2

  1. is that possible to make the main page same as Andriod, with 4 main buttons in the bottom. adding Transactions and Marketplace icons, combine Setting and Help.
  2. Please reduce the empty space between tokens, in the wallet page.

P.S. a bug on iPhone X, if the user didn't turn on passcode/FaceID, launch the app, close the phone, reopen the phone, the app will pause at the starting page(white with our logo in the middle) for a few seconds then close automatically.

Redeem detail work

TODO for redeem submodule.

  1. Show the ticket in RedeemSignatureDisplayActivity (TicketAdapter)
  2. On redeem (ticketBurnNotice) show the alert dialog 'your ticket has been redeemed', and return to AssetDisplayActivity on dismiss.
  3. Change the ticket quantity select to a nice +/- UI element. This is currently done in 'QuantitySelectorHolder'.
  4. Update the UI to make it look like the UX diagram.

The rational behind embeding TTF files in apk?

Hi Justin - why are we bringing in our own font?

 create mode 100755 app/src/main/res/font/font_black.ttf
 create mode 100755 app/src/main/res/font/font_black_italic.ttf
 create mode 100755 app/src/main/res/font/font_bold.ttf
 create mode 100755 app/src/main/res/font/font_bold_italic.ttf
 create mode 100755 app/src/main/res/font/font_extra_light.ttf
 create mode 100755 app/src/main/res/font/font_extra_light_italic.ttf
 create mode 100755 app/src/main/res/font/font_italic.ttf
 create mode 100755 app/src/main/res/font/font_light.ttf
 create mode 100755 app/src/main/res/font/font_light_italic.ttf
 create mode 100755 app/src/main/res/font/font_regular.ttf
 create mode 100755 app/src/main/res/font/font_semibold.ttf
 create mode 100755 app/src/main/res/font/font_semibold_italic.ttf

I hoped that MadCake hasn't included roboto font in the first place, now the apk is again 2MB bigger.

iOS, transfer confirmation txt is wrong

After performing a transfer, it shows "Your ticket has been imported and will be available shortly"

It should be "Your ticket has been transferred and the balance will be updated shortly"

QR Scan icon

whatsapp image 2018-05-07 at 12 29 45 1
whatsapp image 2018-05-07 at 12 29 45

Many users told me this icon is confusing,

  1. they don't, it is a button
  2. it doesn't look like a scan button

I suggest that we change it to a camera icon

Setting page for UI Android

image

Hi Justin,

We need to remove the small setting button(on the top right) and combine the functions it has into the big setting button(on the bottom right)

How to introduce our app in our app?

These marketing content in the app should be updated:

 <string name="intro_title_third_page">Ultra reliable</string>

 Private keys never leave your device.
 Code is open sourced (GPL-3.0 license) and fully audited.
 - The fastest Ethereum wallet experience on mobile.
 + The most excellent Ethereum wallet experience on mobile.

Asset Definition file

I've compiled the first Asset Definition file, but I need Sangalli to fill in the Venues and Cities.

feature request: airdrop notification

If a project wants to do ICO with airdrop, we can send a notification to the user asking whether or not they want to receive a new airdrop. This way our users are encouraged to use our wallet because it gives free money from time to time.

Giving our import/transfer/sell link a fixed name

Currently, there are "pick-up link", "UniversalLink", "Magic Link", "Link" and "MagicLink".
Please change all the "UniversalLink", "Magic Link", "Link" to "MagicLink".
And change the "pick-up link" to "MagicLink for picking up"

a manual language option in app

Don't have a UI yet. but can you put it in Settings/Advanced?
3 languages, English, Chinese and Spanish

Using the similar UI/UX as Network

Transfer and sell links from Android are not working

If you share the links through any App(email, WhatsApp, SMS or any), the link will break into 2 parts and display the landing page.

If you copy the links as text and paste it into a browser, it will open up the landing page, click on the "Import Asset", nothing will happen.

import link on the mobile landing page doesn't work

To reproduce on Android, having installed the app:

Normally (Comparison group):

== Experiment A ==

  1. open http://www.awallet.io/fun.html in Chrome,
  2. Click "Import Asset" link, which anchors at
    https://app.awallet.io/AAAAAFsRIzYnexMYllAwxi4drJZxpvjfd_hVzwAQ78fH2GHBeFzbhkBdYGaPEpmVZ7PUK0nTvEPu4s2oETpcjKSLVJia-wavW7u5Rvx3laJUJUlBOPyRytBcnnvPHA==
  3. Android asks to open the link with AlphaWallet.

But, the bug:

== Experiment B ==

  1. Open https://app.awallet.io/AAAAAFsRIzYnexMYllAwxi4drJZxpvjfd_hVzwAQ78fH2GHBeFzbhkBdYGaPEpmVZ7PUK0nTvEPu4s2oETpcjKSLVJia-wavW7u5Rvx3laJUJUlBOPyRytBcnnvPHA== in Chrome.

  2. Click "Import Asset" link, which anchors at the same place.

  3. Chrome opens the link without Android asking if the link should open in AlphaWallet.

Test posting orders to market queue and getting orders from market queue

Remember AWS username is james.

To get orders expiring from now+5 minutes to now+15 minutes

$ awk 'BEGIN {print systime();}'; 
1518913338
$ wget -qO - https://482kdh4npg.execute-api.ap-southeast-1.amazonaws.com/dev/contract/0x007bee82bdd9e866b2bd114780a47f2261c684e3
{
  "orders": [
   {
        "message": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACOG8m/BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWojJJwB77oK92ehmsr0RR4CkfyJhxoTjAAIAAwAE)",
        "expiry": "1518913831",
        "start": "32800312",
        "count": "3",
        "price": "10000000000000000",
        "signature": "jrzcgpsnV7IPGE3nZQeHQk5vyZdy5c8rHk0R/iG7wpiK9NT730I//DN5Dg5fHs+s4ZFgOGQnk7cXLQROBs9NvgE="
   }        ]
}

To post order: (If you don't have python runtime library, surely you can devise a way to recreate the PUT request in any language, given that the content of example PUT is down below in hex.

$ ./signing_test.py
Public Key: 76338a55250e4f8f4f30d382027eabed84c1e88484c646faea2ff04c14929c49b13ff9ddd4759c7c60ae86cdc55f847f2322b1c3af30c51216a380ebd5297853
Verifying signatures :[True, True]
Putting request.........................
{'data': '000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000000000005a881332007bee82bdd9e866b2bd114780a47f2261c684e300020003000404560dec9670667386a3e6239b5af444dbbd0fee87470cba0d857608a05a65c599002ab9c47c1a7935878368f715a22707e1d527b9a5fc40b12b3a9ac778c66401',
 'headers': {'Content-Type': 'application/vnd.awallet-signed-orders-v0'},
 'url': 'https://482kdh4npg.execute-api.ap-southeast-1.amazonaws.com/dev/public-key/76338a55250e4f8f4f30d382027eabed84c1e88484c646faea2ff04c14929c49b13ff9ddd4759c7c60ae86cdc55f847f2322b1c3af30c51216a380ebd5297853?start=32800312;count=3'}
Receiving response:
"2.0 orders received."

Test code:

#!/usr/bin/python3
import requests
from time import time
import ecdsa
import urllib
import sys
import base64
from random import randint
from pprint import pprint
from binascii import hexlify
from random import randint
from sha3 import sha3_256

sk = ecdsa.SigningKey.generate(curve=ecdsa.SECP256k1)

# Alice wants to sell her 2nd, 3rd and 4th ticket

price = 10000000000000000
price = price.to_bytes(32, byteorder='big')
expiry = int(time())
contract = 0x007bEe82BDd9e866b2bd114780a47f2261C684E3
contract = contract.to_bytes(20, byteorder='big')
lot = 0x000200030004
lot = lot.to_bytes(6, byteorder='big')

key = 0xc64031ec35f5fc700264f6bb2d6342f63e020673f79ed70dbbd56fb8d46351ed
sk = ecdsa.SigningKey.from_secret_exponent(key, curve=ecdsa.SECP256k1)
sk = ecdsa.SigningKey.generate(curve=ecdsa.SECP256k1)
pk = str(hexlify(sk.get_verifying_key().to_string()), "ascii")
print("Public Key: " + pk)

vk = ecdsa.VerifyingKey.from_string(bytearray.fromhex(pk), curve=ecdsa.SECP256k1)

c = randint(1,2) # c means count of orders / signatures

expiries = [(expiry + i*600).to_bytes(32, 'big') for i in range(0,c)]
messages = [b"".join([price, expiry, contract, lot]) for expiry in expiries]

signatures = [sk.sign(message, hashfunc=sha3_256) for message in messages]
# signature has to be padded with a v value per Ethereum requirement
data = messages[0] + b"".join([sig + b'\01' for sig in signatures])

## verify signature

print("Verifying signatures :%s" % 
[vk.verify(sig,msg,hashfunc=sha3_256) for sig,msg in zip(signatures, messages)])

hostname = "482kdh4npg.execute-api.ap-southeast-1.amazonaws.com"
url = "https://{}/dev/public-key/{}?start=32800312;count=3".format(hostname, pk)
headers = {"Content-Type": "application/vnd.awallet-signed-orders-v0"}

print("Putting request.........................")
pprint({'url': url, 'data': str(hexlify(data), "ascii"), 'headers': headers})
r = requests.put(url, data=data, headers=headers)

print("Receiving response:")
if r.status_code == 200:
	print(r.content.decode("utf-8"))
else:
	print(r.status_code)

Test posting an order to the Market Queue

Test script to the market queue server:

#!/usr/bin/python3
import requests
from time import time
import ecdsa
import urllib
import sys
import base64
from random import randint

sk = ecdsa.SigningKey.generate(curve=ecdsa.SECP256k1)

# Alice wants to sell her 2nd, 3rd and 4th ticket
lot = 0x000200030004

contract = 0x007bEe82BDd9e866b2bd114780a47f2261C684E3
price = 10000000000000000
expiry = int(time())


signature = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

message = b"".join([i.to_bytes(32, byteorder='big')
                    for i in [contract, price, expiry]]) + lot.to_bytes(6, byteorder='big')

hostname = "i6pk618b7f.execute-api.ap-southeast-1.amazonaws.com"
uri = "https://{}/test/abc?start=630832800312;count=3".format(hostname)
headers = {"Content-Type": "application/vnd.awallet-signed-orders-v0"}

r = requests.put(uri, data=message + signature*randint(1,101), headers=headers)

if r.status_code == 200:
	print(r.content)

The test script returns the number of signatures returned from the server.

Alternatively, if you don't have python, you can test by using the following binary file which is copied from the http request body of one test.

body_file.gif
body_file

Because this binary file happen to have 2 signatures (the number of signature in the test is random), its format is:
struct {
byte32 contract-address-pad-with-leading-zeros;
byte32 price-in-wei;
byte32 expiry-in-unix-time;
int[3] lot; # lot 2, lot 3, lot 4;
byte65 signature1;
byte65 signature2;
}

If you PUT these data to the test Market Queue, you get a return value indicating the number of signatures.

$ wget -qO - --header=Content-Type:application/vnd.awallet-signed-orders-v0 --method=PUT --body-file=body_file.gif 'https://i6pk618b7f.execute-api.ap-southeast-1.amazonaws.com/test/abc?start=630832800312;count=3'
2

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.