Skip to content

Commit ff1dee7

Browse files
committed
Ability to purchase Bitcoins
1 parent f5b644a commit ff1dee7

File tree

6 files changed

+32
-4
lines changed

6 files changed

+32
-4
lines changed

public/js/all.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/coinpunk/router.js

+8
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,14 @@ coinpunk.router.map('#/addresses/request/:address').to(function() {
166166
});
167167
});
168168

169+
coinpunk.router.map('#/buy').to(function() {
170+
coinpunk.router.initWallet(function(res) {
171+
if(res == false)
172+
return;
173+
coinpunk.router.render('view', 'buy');
174+
});
175+
});
176+
169177
coinpunk.router.map('#/').to(function() {
170178
/*
171179
if(window.navigator.registerProtocolHandler)

public/js/coinpunk/template.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ coinpunk.Template = {
1313
'header',
1414
'node_error',
1515
'signin',
16-
'signup'
16+
'signup',
17+
'buy'
1718
],
1819

1920
templateCache: {},

public/manifest.appcache

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CACHE MANIFEST
2-
# v12
2+
# v13
33
index.html
44
config.json
55
js/all.js
@@ -26,6 +26,7 @@ views/header.html
2626
views/node_error.html
2727
views/signin.html
2828
views/signup.html
29+
views/buy.html
2930

3031
NETWORK:
3132
/api

public/views/buy.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<div class="row">
2+
<div class="col-lg-12 text-center">
3+
<h1>Buy Bitcoins</h1>
4+
<hr>
5+
</div>
6+
</div>
7+
8+
<div class="row">
9+
<div class="col-lg-6 col-lg-offset-3">
10+
<h2 class="text-center">Cash Into Coins</h2>
11+
<p>Cash Into Coins provides a way to purchase Bitcoins using a bank account. Follow the instructions on their site, and they will send the purchased Bitcoins directly to your Coinpunk wallet!</p>
12+
13+
<p class="text-center">
14+
<a href="http://go.cashintocoins.com/UCPiJr?address=<%- coinpunk.wallet.addressHashes()[0] %>" target="_blank" class="btn btn-lg btn-success"><i class="fa fa-money"></i> Buy Bitcoins Now</a>
15+
</p>
16+
</div>
17+
</div>

public/views/header.html

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<li><a href="#/dashboard"><i class="fa fa-bars"></i> Transactions</a></li>
1515
<li><a href="#/addresses/list"><i class="fa fa-arrow-down"></i> Receive</a></li>
1616
<li><a href="#/tx/send"><i class="fa fa-arrow-up"></i> Send</a></li>
17+
<li><a href="#/buy"><i class="fa fa-money"></i> Buy Bitcoins</a></li>
1718
<li class="hidden-xs hidden-sm"><a href="#/backup"><i class="fa fa-download"></i> Backup</a></li>
1819
<% } %>
1920
</ul>

0 commit comments

Comments
 (0)