Skip to content

Commit 487227e

Browse files
author
Jon
committed
Complete modifications of key formats, network, and currecy references to VTC.
1 parent 3728e22 commit 487227e

14 files changed

+35
-34
lines changed

config.template.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"default": {
3-
"bitcoind": "http://rpcuser:[email protected]:18332",
4-
"pricesUrl": "https://bitpay.com/api/rates",
3+
"bitcoind": "http://rpcuser:[email protected]:15888",
4+
"pricesUrl": "http://localhost:8080/rates.json",
55
"testnet": true,
66
"httpPort": 8080,
77
"httpsPort": 8081,
88
"sslKey": "./coinpunk.key",
99
"sslCert": "./coinpunk.crt"
1010
},
1111
"production": {
12-
"bitcoind": "http://rpcuser:[email protected]:8332",
13-
"pricesUrl": "https://bitpay.com/api/rates",
12+
"bitcoind": "http://rpcuser:[email protected]:5888",
13+
"pricesUrl": "http://localhost:8080/rates.json",
1414
"testnet": false,
1515
"httpPort": 8080,
1616
"httpsPort": 4443,

public/css/all.css

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

public/css/font-awesome.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@
11641164
}
11651165
.fa-bitcoin:before,
11661166
.fa-btc:before {
1167-
content: "\f15a";
1167+
content: "\f078";
11681168
}
11691169
.fa-file:before {
11701170
content: "\f15b";

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/controller.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ coinpunk.Controller.prototype.friendlyTimeString = function(timestamp) {
9696
coinpunk.Controller.prototype.updateExchangeRates = function(id) {
9797
coinpunk.pricing.getLatest(function(price, currency) {
9898
$('#balanceExchange').text(' ≈ '+ parseFloat(price * $('#balance').text()).toFixed(2) + ' ' + currency);
99-
$('#exchangePrice').text('1 BTC ≈ ' + price + ' ' + currency);
99+
$('#exchangePrice').text('1 VTC ≈ ' + price + ' ' + currency);
100100

101101
$('#'+id+' .exchangePrice').remove();
102102

public/js/coinpunk/controllers/accounts.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,9 @@ $('body').on('click', '#generateAuthQR', function() {
318318
var authURI = new URI({
319319
protocol: 'otpauth',
320320
hostname: 'totp',
321-
path: 'Coinpunk:'+coinpunk.wallet.walletId
321+
path: 'Vertpunk:'+coinpunk.wallet.walletId
322322
});
323-
authURI.setSearch({issuer: 'Coinpunk', secret: resp.key});
323+
authURI.setSearch({issuer: 'Vertpunk', secret: resp.key});
324324

325325
new QRCode(document.getElementById('authQR'), authURI.toString());
326326
$('#authQR').after('

public/js/coinpunk/controllers/addresses.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ coinpunk.controllers.Addresses.prototype.requestBTCUpdate = function() {
6868
};
6969

7070
coinpunk.controllers.Addresses.prototype.drawRequestQR = function(address) {
71-
var uri = URI({protocol: 'bitcoin', path: address});
71+
var uri = URI({protocol: 'vertcoin', path: address});
7272

7373
var amount = $('#amount').val();
7474
var label = $('#label').val();

public/js/coinpunk/controllers/dashboard.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ coinpunk.controllers.Dashboard.prototype.index = function() {
6464
coinpunk.controllers.Dashboard.prototype.updateExchangeRates = function(id) {
6565
coinpunk.pricing.getLatest(function(price, currency) {
6666
$('#balanceExchange').text(' ≈ '+ parseFloat(price * $('#balance').text()).toFixed(2) + ' ' + currency);
67-
$('#exchangePrice').text('1 BTC ≈ ' + price + ' ' + currency);
67+
$('#exchangePrice').text('1 VTC ≈ ' + price + ' ' + currency);
6868

6969
$('#'+id+' .exchangePrice').remove();
7070

public/js/coinpunk/controllers/tx.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
coinpunk.controllers.Tx = function() {};
22
coinpunk.controllers.Tx.prototype = new coinpunk.Controller();
33

4-
coinpunk.controllers.Tx.prototype.defaultFee = '0.0001';
4+
coinpunk.controllers.Tx.prototype.defaultFee = '0.001';
55
coinpunk.controllers.Tx.prototype.minimumConfirmationsToSpend = 1;
66

77
coinpunk.controllers.Tx.prototype.details = function(txHash) {
@@ -85,23 +85,23 @@ coinpunk.controllers.Tx.prototype.create = function() {
8585
try {
8686
new Bitcoin.Address(address, coinpunk.config.network);
8787
} catch (e) {
88-
errors.push('The provided bitcoin address is not valid.');
88+
errors.push('The provided vertcoin address is not valid.');
8989
}
9090
}
9191

9292
var myAddresses = coinpunk.wallet.addresses();
9393

9494
for(var i=0; i<myAddresses.length;i++) {
9595
if(myAddresses[i].address == address)
96-
errors.push('You cannot send to your own bitcoin wallet.');
96+
errors.push('You cannot send to your own vertcoin wallet.');
9797
}
9898

9999
if(amount == '' || parseFloat(amount) == 0)
100100
errors.push('You must have a valid amount to send.');
101101
else if(/^[0-9]+$|^[0-9]+\.[0-9]+$|^\.[0-9]+$/.exec(amount) === null)
102102
errors.push('You must have a valid amount to send.');
103103
else if(coinpunk.wallet.safeUnspentBalance().lessThan(new BigNumber(amount).plus(calculatedFee))) {
104-
errors.push('Cannot spend more bitcoins than you currently have.');
104+
errors.push('Cannot spend more vertcoins than you currently have.');
105105
}
106106

107107
if(errors.length > 0) {
@@ -126,7 +126,7 @@ coinpunk.controllers.Tx.prototype.create = function() {
126126
delete coinpunk.wallet;
127127
} else {
128128
$.post('/api/tx/send', {tx: rawtx}, function(resp) {
129-
coinpunk.database.setSuccessMessage("Sent "+amount+" BTC to "+address+".");
129+
coinpunk.database.setSuccessMessage("Sent "+amount+" VTC to "+address+".");
130130

131131
self.getUnspent(function() {
132132
coinpunk.router.route('dashboard');
@@ -170,7 +170,7 @@ coinpunk.controllers.Tx.prototype.calculateFee = function() {
170170

171171
var calculatedFee = coinpunk.wallet.calculateFee(amount, address, changeAddress);
172172
$('#calculatedFee').val(calculatedFee);
173-
$('#fee').text(coinpunk.wallet.calculateFee(amount, address, changeAddress)+' BTC');
173+
$('#fee').text(coinpunk.wallet.calculateFee(amount, address, changeAddress)+' VTC');
174174
this.updateExchangeRates('container', false);
175175
};
176176

@@ -198,12 +198,12 @@ coinpunk.controllers.Tx.prototype.scanQR = function(event) {
198198
return;
199199
}
200200

201-
if(uri.protocol() != 'bitcoin')
202-
return errorsDiv.removeClass('hidden').text('Not a valid Bitcoin QR code.');
201+
if(uri.protocol() != 'vertcoin')
202+
return errorsDiv.removeClass('hidden').text('Not a valid Vertcoin QR code.');
203203

204204
var address = uri.path();
205205
if(!address || address == '')
206-
return errorsDiv.removeClass('hidden').text('No Bitcoin address found in QR code.');
206+
return errorsDiv.removeClass('hidden').text('No Vertcoin address found in QR code.');
207207

208208
$('#address').val(address);
209209

public/js/coinpunk/models/wallet.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ coinpunk.Wallet = function(walletKey, walletId) {
285285
}
286286

287287
if(unspentAmt.compareTo(total) < 0) {
288-
throw "you do not have enough bitcoins to send this amount";
288+
throw "you do not have enough vertcoins to send this amount";
289289
}
290290

291291
for(i=0;i<unspent.length;i++) {
@@ -330,7 +330,7 @@ coinpunk.Wallet = function(walletKey, walletId) {
330330
var tx = this.createTx(amtString, 0, addressString, changeAddress);
331331
var txSize = tx.raw.length / 2;
332332
// console.log(txSize);
333-
return Math.ceil(txSize/1000)*0.0001;
333+
return Math.ceil(txSize/1000)*0.001;
334334
};
335335

336336
this.createSend = function(amtString, feeString, addressString, changeAddress) {

public/js/coinpunk/router.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ coinpunk.router.listener = function() {
2929
sock.onopen = function() {
3030
coinpunk.router.listenerTimeout = setInterval(function() {
3131
sock.send(JSON.stringify({method: 'listUnspent', addresses: coinpunk.wallet.addressHashes()}));
32-
}, 30000);
32+
}, 60000);
3333
};
3434

3535
sock.onmessage = function(res) {
@@ -72,7 +72,7 @@ coinpunk.router.map('#/backup/download').to(function() {
7272

7373
var payload = coinpunk.wallet.encryptPayload();
7474
var blob = new Blob([payload], {type: "text/plain;charset=utf-8"});
75-
saveAs(blob, "coinpunk-wallet.txt");
75+
saveAs(blob, "vertpunk-wallet.txt");
7676
coinpunk.router.route('backup');
7777
});
7878
});

public/js/lib/bitcoinjs.js

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

public/views/buy.html

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
<div class="row">
22
<div class="col-lg-12 text-center">
3-
<h1>Buy Bitcoins</h1>
3+
<h1>Buy Vertcoins</h1>
44
<hr>
55
</div>
66
</div>
77

88
<div class="row">
99
<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-
10+
<h2 class="text-center">Cryptsy</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+
<p>While there is no easy way to directly purchase Vertcoin from USD yet, you can use Cryptsy to trade bitcoin or other coins for Vertcoin that you can send directly to your Vertpunk wallet. Cryptsy is an Internet startup focusing on the exchange of Crypto-Currency, where you can purchase and trade more than 90 different types of crypto-currency -- including Vertcoin.</p>
1313
<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>
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+
<a href="https://www.cryptsy.com/users/register?refid=25450" target="_blank" class="btn btn-lg btn-success"><i class="fa fa-money"></i> Buy Vertcoins Now</a>
1516
</p>
1617
</div>
17-
</div>
18+
</div>

public/views/header.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +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> -->
17+
<li><a href="#/buy"><i class="fa fa-money"></i> Buy Vertcoins</a></li>
1818
<li class="hidden-xs hidden-sm"><a href="#/backup"><i class="fa fa-download"></i> Backup</a></li>
1919
<% } %>
2020
</ul>

0 commit comments

Comments
 (0)