GithubHelp home page GithubHelp logo

blockchain / my-wallet-v3-frontend Goto Github PK

View Code? Open in Web Editor NEW
211.0 63.0 168.0 140.29 MB

Blockchain Web Wallet Frontend

Home Page: https://blockchain.info/wallet

License: GNU Affero General Public License v3.0

HTML 23.46% CSS 6.54% JavaScript 69.67% Shell 0.06% Ruby 0.17% Makefile 0.10%
bitcoin wallet unit-tested ethereum javascript angular frontend html grunt yarn

my-wallet-v3-frontend's Introduction

Blockchain.info Wallet

Build Status Coverage Status License: AGPL v3

Be Your Own Bank at blockchain.info/wallet. Please contact support if you have any issues using the wallet.

Run the wallet on your own computer

The normal and easiest way to use our wallet is to go to blockchain.info/wallet. However if you like more control over the exact code that runs in your browser, you can download the source code and run the wallet from a simple server on your own machine. Here's how:

  1. Install Node.js
  2. git clone [email protected]:blockchain/My-Wallet-V3-Frontend.git -b v1.11.11 --single-branch --depth 1
  3. make server

Login to your existing wallet or create a new one at http://localhost:8080/.

You can replace v1.11.11 with any tagged version you like, but we recommend always using the latest release. The versions marked as pre-release have not gone through extensive internal testing yet.

Note that the wallet itself is still stored on Blockchain.info servers. It is encrypted with your password. The wallet also uses the Blockchain.info servers to show you your balance, notify you of new payments, submit transactions, etc.

About

The frontend code in this repository uses AngularJS. The Bitcoin specific tasks are handled by My-Wallet-V3, which is included via Bower.

Develop

Make sure you have Node.js installed.

You also need Sass (use sudo if you're not using a Ruby version manager):

gem install sass

Install dependencies:

npm install -g bower grunt-cli && yarn && bower install

Create a file called .env in the root of the project. Put the following in it:

ROOT_URL=https://blockchain.info

Optionally you can add:

AUTO_RELOAD=1
WEB_SOCKET_URL=wss://ws.blockchain.info/inv
API_DOMAIN=https://api.blockchain.info
WALLET_HELPER_URL=http://localhost:8081

To inspect individual directives, run:

yarn run start-parts

Build

Grunt watches and compiles the pug view templates and CSS. Keep it running:

grunt

Lint

To run the file linter:

yarn lint

Test

To run test and monitor for changes:

yarn test

Vet

To ensure builds will succeed (linting and unit tests passing):

yarn vet

A coverage report is generated after you run the test for the first time. Just open coverage/index.html in your browser.

Run

Run local http server:

yarn start

Visit localhost:8080.

Developing My-Wallet-V3

If you are making changes to My-Wallet-V3 that you want to try out in the frontend, create a symlink:

rm My-Wallet-V3-Frontend/bower_components/blockchain-wallet/dist/my-wallet.js
ln -s ../../../../My-Wallet-V3/dist/my-wallet.js My-Wallet-V3-Frontend/bower_components/blockchain-wallet/dist/my-wallet.js

To automatically login and go back to where you last were in the app after every page refresh, create a file .env and add AUTO_RELOAD=1 to it.

If you enable "handle bitcoin links" in your wallet settings, you can open bitcoin URI's like this one:

bitcoin:?address=1FeerpCgswvGRLVKme759C96DUBtf7SvA2?amount=0.01

Contribute

Bug fixes and feedback on our code is always appreciated.

Security

Security issues can be reported to us in the following venues:

my-wallet-v3-frontend's People

Contributors

abhisharma2 avatar achtenhagen avatar alecalve avatar dev-christine-wang avatar empowerful avatar jstettner avatar jtormey avatar karinashenaz avatar keonne avatar kmhouk avatar kristovatlas avatar kwgithubusername avatar larskrueger avatar lyncee59 avatar makevoid avatar mmaton avatar mpfluger avatar noguchiandrew avatar pernas avatar plondon avatar prwelber avatar sam0711er avatar schnogz avatar sha49 avatar sjors avatar theleob avatar thore3 avatar tuzzolo avatar wseng 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  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

my-wallet-v3-frontend's Issues

Main transaction screen doesn't automatically 'load more'

We're using angular-inview to determine when to load more transactions: https://github.com/thenikso/angular-inview. The directive in-view="nextPage()" at the bottom of transactions.jade, triggers nextPage() every time it's visible. Could related to CSS positioning, e.g. see:
thenikso/angular-inview#39

This specific line could be the cause of our problem:
getViewportHeight = ->
height = window.innerHeight

We’d have to do some offsetting to not place it at the window level, but at the container level or maybe write our own function to reset window height.

No Login possible

There is no Login possible anymore.

After clicking in Login, nothing happens. Console output was:

Error: wallet.my.wallet.bch is undefined
Wallet/wallet.fetchAccountInfo/<@https://blockchain.info/en/wallet/js/wallet-d1844e81e354bae855457e84563b49931d1bb11c.min.js:11:9826
e/<@https://blockchain.info/en/wallet/js/landing-eda5b5ad49141e41deabce6d75fd9af6c4b4c7c2.min.js:133:434
$eval@https://blockchain.info/en/wallet/js/landing-eda5b5ad49141e41deabce6d75fd9af6c4b4c7c2.min.js:148:65
$digest@https://blockchain.info/en/wallet/js/landing-eda5b5ad49141e41deabce6d75fd9af6c4b4c7c2.min.js:145:123
$evalAsync/<@https://blockchain.info/en/wallet/js/landing-eda5b5ad49141e41deabce6d75fd9af6c4b4c7c2.min.js:148:154
f@https://blockchain.info/en/wallet/js/landing-eda5b5ad49141e41deabce6d75fd9af6c4b4c7c2.min.js:46:490
mg/k.defer/c<@https://blockchain.info/en/wallet/js/landing-eda5b5ad49141e41deabce6d75fd9af6c4b4c7c2.min.js:49:41

Unable to open old wallet due to an error when calling getHistory() on the bch wallet

I have never enabled the BCH wallet through the settings interface but the wallet address has some BTC in it that existed before the fork.

Here is the error seen in my developers console for Chrome Version 63.0.3239.84

screen shot 2017-12-18 at 3 29 45 pm

This results in the Login button being greyed out but the Frontend Webapp being in a crashed state. Perhaps the code should be updated to check if that wallet exists or has been initialized?

Does anyone know if there is a way to initialize the wallet in the console so that I can access the webapp wallet?

history.push(wallet.my.wallet.bch.getHistory());

"JSON.parse: unexpected character at line 1 column 1 of the JSON data"

I am using the latest Tor Browser. It is impossible to start a new wallet, I get a "JSON.parse: unexpected character at line 1 column 1 of the JSON data" error every time.

It is also impossible to on on the existing wallets. Most of the time, like 90% of the times, when you finally log on your wallet it's empty, there are no funds and no archived transactions.

The address blockchainbdgpzk.onion also redirects me every time to blockchain.info and blockchain.info recognizes that I use Tor so it redirects me to blockchainbdgpzk.onion and this goes on to ad infinium.

Angular.ui native international-phone-number / intl-tel-input alternative

We're trying to remove jQuery as a dependency. The phone number entry field powered by international-phone-number. This is a wrapper around the intl-tel-input jQuery plugin.

Here's where I use it:
https://github.com/blockchain/My-Wallet-V3-Frontend/blob/master/app/templates/configure-mobile-number.jade#L3-L11

screenshot

Two approaches have been tried so far:
1 - replace all jQuery methods with more primitive Javascript code;
2 - replace jQuery with a smaller framework, e.g. Zepto

I would prefer a solution more or less built from scratch on top of either ui.bootstrap.typeahead or ui.select.

The country flags can be found here: https://github.com/behdad/region-flags

Rather than forking intl-tel-input and international-phone-number, I would suggest creating two new projects:

1 - a purely functional JS library. It takes a user input string and
returns a formatted phone numer and country code. Some of the code you'll need:

https://github.com/Bluefieldscom/intl-tel-input/blob/master/src/js/data.js
https://github.com/Bluefieldscom/intl-tel-input/blob/master/lib/libphonenumber/src/utils.js

For example the function would convert the input "1650" to {number: "+1 (650)", country: "us", valid: false}.

2 - an AngularJS wrapper that uses (1) and ui.select or ui.bootstrap, to
create a UI similar to international-phone-number / intl-tel-input. It can have fewer features and configuration options.

The end result would e.g. be a directive used like this:
<phone-number ng-model="theNumber" default-country="us" preferred-countries="us gb ca" />

If theNumber is already set, it should show that initial value and the correct country flag on load. As the user types it should correct the number formatting, update the country flag, update the ng-model and validate it.

Bounty:
![Bountysource](https://www.bountysource.com/badge/issue?issue_id= 27091686)

See also the discussion at mareczek/international-phone-number#44

Reviewing Japanese translation

I am reviewing the Japanese translations for both the front end and iOS.

Just double checking:
I should check the keys for en-human.json and translate them into Japanese as save it as My-Wallet-V3-Frontend/locales/ja-human.json? or should I overwrite ja-robot.json?

in my PR, should I delete ja-robot.json?

Please handle issues help

why the same line, the outside and inside are not the same
why time confirmation so long, has one day before
thanks for watching email
zalo_screenshot_7_2_2016_1634778
zalo_screenshot_7_2_2016_1636228

No support for CashAddr addresses

Bitcoin ABC, one of the main Bitcoin Cash implementations, has added a new address format called CashAddr, which is the developers' recommended format. Bitpay and Copay have already adopted it by using it by default. My Wallet is currently incompatible and will detect CashAddr addresses as invalid, which makes it harder for people to do transactions in Bitcoin Cash.

Further resources:
Official specifications: https://github.com/Bitcoin-UAHF/spec/blob/master/cashaddr.md
Go converter implementation: https://github.com/schancel/cashaddr-converter
Angular 2 converter implementation: https://github.com/bitpay/address-translator

Export history should escape values containing commas

When using the Export History to create a CSV, any fiat values over 1000 contain thousand comma-separators.

e.g.

2015-01-01,00:00:00 GMT +00:00,sent,-4.3141,$ -1,157.26,$ -2,523.66,$ 268.25,......

This makes parsing a CSV difficult.

These values should either be escaped with quotes or not have commas.

i.e.

"$ -2,523.66" or $ -2523.66

I tried to track down the code to create a pull request, but it calls the Blockchain.API from exportHistory in wallet.service.js, which goes off to request "V2/export-history". Couldn't find that.

Running "sass:build" (sass) task Error: File to import not found or unreadable Aborted due to warnings.

ERROR in ./~/css-loader!./~/sass-loader!./helperApp/plaid/plaid.scss
Module build failed:
@import "../../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/variables";
^
      File to import not found or unreadable: ../../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/variables.
Parent style sheet: stdin
      in /Users/zen/Dropbox/Musafa/dev/My-Wallet-V3-Frontend/helperApp/plaid/plaid.scss (line 2, column 1)
 @ ./helperApp/plaid/plaid.scss 4:14-118

ERROR in ./helperApp/plaid/plaid.scss
Module build failed: ModuleBuildError: Module build failed:
@import "../../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/variables";
Running "sass:build" (sass) task
>> Error: File to import not found or unreadable: ../../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/variables
>>        Parent style sheet: /Users/zen/Dropbox/Musafa/dev/My-Wallet-V3-Frontend/assets/css/_bootstrap-blockchain.scss
>>         on line 2 of assets/css/_bootstrap-blockchain.scss
>> >> @import "../../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/va
>>    ^
Warning:  Use --force to continue.

Aborted due to warnings.

Cannot log into old account because of faulty authorization redirect loop

I definitely used the correct wallet id and password, but I haven't logged in since 2014. So it sends me an email with the subject: "Authorize log-in attempt". I press on the big blue "AUTHORIZE LOG IN" button and it redirects me to a page that says: "Login approved! Please return to your previous browser / tab to see your wallet."

...What now? There was no previous "browser" or "tab". If I back out of the page I'm still not inside my wallet. If I refresh that page or the log in screen I'm still not logged in and throws a prompt saying "Request Already Approved or Expired". What gives?

Would fixing this redirect code allow me to access my wallet?

A search online shows that others have the same problem:
https://www.reddit.com/r/BitcoinBeginners/comments/6cso5n/blockchaininfo_login_loop/
https://www.reddit.com/r/btc/comments/45bdzr/has_anyone_else_got_an_email_like_this_from/

Wallet not showing ETH and BCH addresses since recent update

ETH and BCH balances are currently unavailable to be spent, nor is their transaction history displayed in the client. It prompts the user to get started with ETH and BCH when you navigate to their pages, even if balances have existed for multiple months

Incorrect private key displayed for old uncompressed public key addresses

The private key displayed for old addresses in the Imported Addresses list is a private key for a compressed public key, even if the addresses is for an uncompressed public key. The uncompressed form of the private key should be the one that is shown.

Here is a screenshot illustrating the problem:
https://i.imgur.com/GVXUPkf.png

As you can see in the screenshot, a compressed private key is given. However actually importing that private key into other wallets will yield a different address. Putting it in bitaddress.org reveals the problem; the address displayed (and used) is for the uncompressed public key, but the private key given is a for a compressed private key.

Unable to establish session

Frontend started without errors, but:

Can not login to my account. Error: "Unable to establish session"
Can not create new account. Error: "Error generatin the entropyError: Received not ok statis: 404"

Frontend version in footer "vIntermediate (MyWallet v3.39.5)"

Timestamps

This isn't an issue at all but I have no idea where to ask this, I am using https://blockchain.info/api/blockchain_api for getting transactions and all that good stuff but I would like to soften my hits since there is a rate limit so my goal is only to request transactions from an address only between certain dates. Please, if this is possible and how, that would be amazing.

Send to unchecked private key should be disallowed

Today on Reddit, a user reported 5 BTC lost because of a software error which caused him to send funds to the wrong address: https://www.reddit.com/r/Bitcoin/comments/6rnfjf/beware_of_blockchaininfo_i_just_lost_5_btc_due_to/

Coinbase recently introduced (and fixed) a bug in their app which caused QR codes for receiving addresses to be malformed according to the BIP 21 spec. The absence of a colon between "bitcoin" and the user's intended receiving address created a string which MyWallet recognized as a valid 40-44 character Base58 private key. Only after sending did the user realize that something was amiss, and that his funds had been sent to a different Bitcoin address than intended.

MyWallet will currently accept a private key in any usable format. This makes sense when importing a key into the wallet, but not when sending a transaction, since Wallet.isValidPrivateKey() will return true for many inputs that were not intended to be private keys. This behavior should be modified such that private keys are only accepted when sending a transaction if they can be checked for accuracy. E.g. WIF and mini private keys are acceptable, but private keys in any unchecked format should be considered invalid. Otherwise, the lack of error checking can lead to transactions unintentionally sent to unknown addresses, only recoverable if the user can recall what data was accidentally used as a key.

Leading space in receive address

When copying the newly created address to my clipboard, either by using the button or marking the text with my cursor, a leading space is added to the address. This causes some other systems to think that the address is invalid.

System info:
Mozilla Firefox 49.0

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"

Linux laptop 4.4.0-45-generic #66-Ubuntu SMP Wed Oct 19 14:12:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Wallet IP Banned

I was playing around with retrieving transactions in scripts and I guess I was polling the server too much that it thinks its spam or an attack. I won't do that many requests at once again, but what is the process for un-banning my ip?

Unable to establish session

Hello,
When I try to login I have this error : Unable to establish session
Someone can help me to fix my issue ?

No licence

Absence of license is a barrier to contribution for some would-be developers. One blockchain repo (My-Wallet-V3-iOS) uses LGPL, but many do not have anything listed.

In case you are unaware of how to fix this: https://choosealicense.com/

export list of addresses for account

Feature request.
Would be nice to have easy way to export addresses for account without enabling api or revealing private keys. See this stackexchange.

Simply button for popup with addr1\naddr2\naddr3 to copy-paste it would be well enough.

How I fix this?

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]

No login email

Hey guys! I can't get "login attempt" email. Yesterday i got one, but after i was logged out and tried to log in again, no more emails were received. Spam/etc. folders are empty. What can be the reason?

"METADATA_FETCH_FAILED"

Everytime I login to blockchain wallet, on mywallet v.3.41.6, It says to click authorization link in email, so i go to my email in another tab, click the authorization link, which sends me to anew tab like this: "https://blockchain.info/wallet/#/authorize-approve/xxxxxx"

Then It says SUCCESS with a green checkmark, and I go to my previous blockchain wallet tab, and after a few seconds, a red window pops up saying "METADATA_FETCH_FAILED"

This error has happened in Chrome, Firefox, Internet Explorer, Privatebrowsing/incognito both on and off....

Please help! Support is not helping with this .~!

please provide me any one who is responsible i will ask that guy.

I have opened ticket almost 5 days ago and they never responded and never seen my ticket ....

I have done an Exchange From My account Using Etherum to Bitcoin and its failed and My payment Got Held in Pending Order Id is "SFT-be601692-27fb-4689-adb9-578802ddb4ee"

No 'Access-Control-Allow-Origin' header is present on the requested resource.

Hi all!
I'm trying to run a local version of the project, but it's work only for localhost :( I mean I can't have access from 192.168.1.2 or 127.0.0.1.

Failed to load https://blockchain.info/uuid-generator?format=json&n=2&api_code=*** No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Is it possible to solve this problem?
Thanks!

CLose it

1JaEQrUmVn9u6Krc7RndxRCa5iXhgcBWCz

Impossible to login - page instantly reloads and logs you out

Summary

I am unable to login to my wallet in any functional way because the page instantly reloads and logs me out. I can provide a screen recording of the bug in action but I'm not putting it on a public site.

Steps to reproduce

Go to https://blockchain.info/wallet/#/login
and login to your account.

And yes, correct ID / password / 2FA are all given

Expected result

I am logged in and able to interact with my wallet.

What actually happens

I am logged in for about 300ms before the entire page reloads and sends me back to https://blockchain.info/ . Trying to go back to https://blockchain.info/wallet/#/home redirects me to the login page. So I am effectively locked out of my wallet.

Browsers used

Firefox 55 and Chromium 60.0.3112.78

Version of app

Whatever is hosted on blockchain.info at the moment

TREZOR Connect integration

Hi,

I was thinking to integrate TREZOR Connect into blockchain wallet (for example - first to receive and send bitcoins between wallets, later on possible login or 2FA). Would you consider it useful and in case i send you PR would you merge it if it pass quality tests?

It seems to me good idea to integrate hot and cold wallet for seamless funds transfer.

Used addresses

I can see all my used addresses in a wallet, i am only able to see just one not even the current unused address.

hello Blockchain.

Hello Sir ,

I tried many time to contact you do you provide support or just have support channel so that people think you are working on it and you never checked that ?

I have posted ticket almost 6 days ago and no one here to check that .....

please check that .

I have done an Exchange From My account Using Etherum to Bitcoin and its failed and My payment Got Held in Pending Order Id is "SFT-be601692-27fb-4689-adb9-578802ddb4ee"

Please check and Update me Asap

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.