Skip to content
This repository was archived by the owner on Jun 13, 2023. It is now read-only.

Commit 5443eb6

Browse files
authored
Merge pull request #468 from ethereum/develop
Updates live wallet
2 parents 9f2998d + d084d95 commit 5443eb6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+184
-722
lines changed

.DS_Store

6 KB
Binary file not shown.

app/.meteor/versions

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ ejson@1.0.11
3434
ethereum:accounts@0.4.0
3535
ethereum:blocks@0.3.2
3636
ethereum:dapp-styles@0.5.7
37-
ethereum:elements@0.7.17
37+
ethereum:elements@0.7.18
3838
ethereum:tools@0.7.0
3939
ethereum:web3@0.15.3
4040
fastclick@1.0.11

app/client/lib/helpers/templateHelpers.js

+8-9
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,26 @@ Check if in mist
2828
@method (isMist)
2929
**/
3030
Template.registerHelper('isMist', function(){
31-
return (typeof mist !== 'undefined');
31+
return (typeof window.mistMode === 'undefined');
3232
});
3333

3434
/**
3535
Check if in mist and in mist mode
3636
37-
@method (isMistMode)
37+
@method (isWalletMode)
3838
**/
3939
Template.registerHelper('isWalletMode', function(){
4040
return window.mistMode === 'wallet' || typeof mist === 'undefined'; // also show network info in normal browsers
4141
});
4242

4343
/**
44-
Check if currenct unit is an ether unit
44+
Check if currency unit is an ether unit
4545
4646
@method (isEtherUnit)
4747
**/
4848
Template.registerHelper('isEtherUnit', function(){
4949
var unit = EthTools.getUnit();
50-
return !(unit === 'usd' || unit === 'eur' || unit === 'btc');
50+
return !(unit === 'usd' || unit === 'eur' || unit === 'btc' || unit === 'gbp' || unit === 'brl');
5151
});
5252

5353

@@ -85,7 +85,7 @@ Template.registerHelper('isVulnerable', function(address){
8585
// add vulnerabilities to account
8686
account.vulnerabilities = wallet.vulnerabilities;
8787
return account;
88-
} else
88+
} else
8989
return false;
9090
});
9191

@@ -114,7 +114,7 @@ Returns a list of accounts and wallets sorted by balance
114114
**/
115115
Template.registerHelper('selectAccounts', function(hideWallets){
116116
var accounts = EthAccounts.find({balance:{$ne:"0"}}, {sort: {balance: 1}}).fetch();
117-
117+
118118
if(hideWallets !== true)
119119
accounts = _.union(Wallets.find({owners: {$in: _.pluck(EthAccounts.find().fetch(), 'address')}, address: {$exists: true}}, {sort: {name: 1}}).fetch(), accounts);
120120

@@ -202,7 +202,7 @@ Formats a given transactions balance
202202
Template.registerHelper('formatTransactionBalance', Helpers.formatTransactionBalance);
203203

204204

205-
/**
205+
/**
206206
Formats address to a CaseChecksum
207207
208208
@method toChecksumAddress
@@ -215,12 +215,11 @@ Template.registerHelper('toChecksumAddress', function(address){
215215

216216

217217

218-
/**
218+
/**
219219
Takes a camelcase and shows it with spaces
220220
221221
@method toSentence
222222
@param {string} camelCase A name in CamelCase or snake_case format
223223
@return {string} sentence The same name with spaces
224224
**/
225225
Template.registerHelper('toSentence', Helpers.toSentence);
226-

app/client/lib/thirdparty/coinbase-widget.js

-50
This file was deleted.

app/client/styles/elements.import.less

+2-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ span.address {
4343
margin-bottom: 10px;
4444
}
4545

46-
.dapp-actionbar .icon-bitcoin {
46+
.dapp-actionbar .icon-ethereum {
4747
height: 26px;
48-
background-image: url('bitcoin-icon.svg');
48+
background-image: url('ethereum-icon.svg');
4949
background-repeat: no-repeat;
5050
background-position: center;
5151
}
@@ -690,7 +690,6 @@ table {
690690
}
691691
}
692692

693-
694693
@keyframes jiggle {
695694
0% { transform: rotate(-10deg); }
696695
100% { transform: rotate(10deg); }

app/client/templates/views/account.html

+19-27
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
{{else}}
1313
{{> dapp_identicon identity=address}}
1414
<h1 class="{{ensClass}}">
15-
<span>{{displayName}}</span>
15+
<span>{{displayName}}</span>
1616

1717
{{#if $or owners jsonInterface}}
1818
<button class="dapp-icon-button delete icon-trash"></button>
1919
{{/if}}
2020
</h1>
21-
{{> elements_balance balance=balance changeUnit=true showAllDecimals=true}}
21+
{{> elements_balance balance=balance changeUnit=true showAllDecimals=true}}
2222
{{/with}}
2323
</div>
2424

@@ -27,11 +27,11 @@ <h1 class="{{ensClass}}">
2727
<header class="{{ensClass}}">
2828
<h1>
2929
{{#if ens}}
30-
<span>{{displayName}}</span>
30+
<span>{{displayName}}</span>
3131
{{else}}
32-
<em class="edit-name">{{displayName}}</em>
32+
<em class="edit-name">{{displayName}}</em>
3333
<i class="edit-icon icon-pencil"></i>
34-
{{/if}}
34+
{{/if}}
3535
</h1>
3636
<h2 class="copyable-address">{{walletIcon}}
3737
<!-- <input type="text" value="{{toChecksumAddress address}}" readonly class=""> -->
@@ -128,38 +128,30 @@ <h3>{{i18n "wallet.app.texts.note"}}</h3>
128128
</li>
129129

130130
{{#if $eq ($.Session.get "network") "main"}}
131-
<li>
132-
<a href="https://shapeshift.io/shifty.html?destination={{address}}&amp;output=ETH&amp;apiKey=ef8312d8c9b9dda64fb852e8683eac6c33123f8743ff11383fb3bab29a364c01c27343fced4e628db8d5d66d763565763f8699c0fc903ec23db31cb908a944c8" target="_popup" data-popup-width="" data-popup-height="">
133-
<i class="icon-bitcoin"></i>
134-
{{i18n "wallet.accounts.buttons.depositBitcoin"}}
135-
</a>
136-
</li>
137-
{{/if}}
138131

139-
{{#if $eq ($.Session.get "network") "main"}}
140-
<li>
141-
<button class="deposit-using-coinbase">
142-
<i class="icon-credit-card"></i>
143-
{{i18n "wallet.accounts.buttons.depositUsingCreditCard"}}
144-
</button>
145-
</li>
146-
{{/if}}
132+
{{#if ownedAccount}}
133+
<li>
134+
<a href="https://changelly.com/widget/v1?auth=email&from=USD&to=ETH&merchant_id=47f87f7cddda&address={{address}}&amount=1&ref_id=e25c5a2e8719&color=02a8f3" target="_blank">
135+
<i class="icon-ethereum"></i>
136+
{{i18n "wallet.accounts.buttons.buyEther"}}
137+
</a>
138+
</li>
139+
{{/if}}
147140

148-
{{#if $eq ($.Session.get "network") "main"}}
149141
<li>
150-
<a href="https://etherscan.io/address/{{address}}">
142+
<a href="https://etherscan.io/address/{{address}}" target="_blank">
151143
<i class="icon-info"></i>
152144
{{i18n "wallet.accounts.buttons.viewOnExplorer"}}
153145
</a>
154-
</li>
146+
</li>
155147
{{/if}}
156148

157149
<li>
158150
<button class="copy-to-clipboard-button">
159151
<i class="icon-docs"></i>
160152
{{i18n "wallet.accounts.buttons.copyAddress"}}
161153
</button>
162-
</li>
154+
</li>
163155
<li>
164156
<button class="qrcode-button">
165157
<i class="icon-camera"></i>
@@ -173,7 +165,7 @@ <h3>{{i18n "wallet.app.texts.note"}}</h3>
173165
{{i18n "wallet.accounts.buttons.showInterface"}}
174166
</button>
175167
</li>
176-
{{/if}}
168+
{{/if}}
177169

178170
</ul>
179171
</nav>
@@ -202,7 +194,7 @@ <h2>{{i18n 'wallet.transactions.latest'}}</h2>
202194
{{#with customContract}}
203195
<h2>{{i18n 'wallet.events.latest'}}</h2>
204196
<br>
205-
197+
206198
<div>
207199
<input type="checkbox" id="watch-events-checkbox" class="toggle-watch-events" checked="{{TemplateVar.get 'watchEvents'}}">
208200
<label for="watch-events-checkbox">{{i18n "wallet.contracts.buttons.watchContractEvents"}}</label>
@@ -213,7 +205,7 @@ <h2>{{i18n 'wallet.events.latest'}}</h2>
213205
{{> spinner}}
214206
</div>
215207
{{/if}}
216-
208+
217209
{{> elements_event_table ids=contractEvents}}
218210
{{/with}}
219211
</div>

0 commit comments

Comments
 (0)